Practical Programming COMP153-08S Lecture 1: Starting to program.

Slides:



Advertisements
Similar presentations
 2007 Dr. Natheer Khasawneh. Chapter 13. Graphical User Interface Concepts: Part 1.
Advertisements

Compunet Corporation Programming with Visual Studio.NET GUI Week 13 Tariq Aziz and Kevin Jones.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Sixth Edition by Tony Gaddis, Judy Walters,
Welcome to CS201!!! Introduction to Programming Using Visual Basic.
Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
CS0004: Introduction to Programming Events. Review  Event Procedure  A set of instructions to be executed when a certain event happens.  Many event-driven.
To define a class in Visual Basic.NET, you can follow this general procedure: 1. Add a class to the project. 2. Provide an appropriate file name for.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
Why Program? Computer – programmable machine designed to follow instructions Program – instructions in computer memory to make it do something Programmer.
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
Visual Basic Fundamental Concepts. Integrated Development Enviroment Generates startup form for new project on which to place controls. Features toolbox.
Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Ch 26 & 27 User Interfaces.
By: Dwayne Burl.  The Central Processing Unit (CPU) is responsible for interpreting and executing most of the commands from the computer's hardware and.
CS0004: Introduction to Programming Variables – Numbers.
CS 0004 –Lecture 1 Wednesday, Jan 5 th, 2011 Roxana Gheorghiu.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 11 1 Microsoft Office Access 2003 Tutorial 11 – Using and Writing Visual Basic for Applications.
Automating Tasks with Visual Basic. Introduction  When can’t find a readymade macro action that does the job you want, you can use Visual Basic code.
Chapter 8: Writing Graphical User Interfaces
Computer Programming Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute of Technology
Lecture 2 “Structure of computer” Informatics. Computer is  general purpose device that can be programmed to carry out a set of arithmetic or logical.
Chapter 9: Getting Comfortable with Object- Oriented Programming.
 Why?  Because it can be programmed to do more than one specific task. ◦ Accountants ~ tax forms etc. ◦ Machinists ~ control drilling, lathes etc. ◦
Chapter 3 – Fundamentals of Programming in VB.NET VB.NET Controls VB.NET Events Numbers Strings Input and Output.
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 4 Working with Variables, Constants, Data Types, and Expressions.
Visual C++ Programming: Concepts and Projects
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
Carnegie Mellon University MSCF1 C#/.NET Basics 2 Some code is from “C# in a Nutshell”
Chapter 2 –Visual Basic, Controls, and Events
Windows Forms. Architecture Wrapper around WIN32API Part of the.NET Framework Code can be in C# or VB Toolbox has forms elements (buttons, etc.) Dragging.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Unit 3: Adding Code to a Microsoft ASP.NET Web Form.
COM148X1 Interactive Programming Lecture 7. Topics Today HCI Event Handling.
Mrs. Ulshafer August, 2013 Java Programming Chapter 1.
CIS 338: Classes and Modules Dr. Ralph D. Westfall May, 2011.
IMS 3253: Subroutines 1 Dr. Lawrence West, MIS Dept., University of Central Florida Topics Procedures Subroutines Parameters –By Value.
B.Ramamurthy11/9/20151 Computers and Programming Bina Ramamurthy 127 Bell Hall
3.2 VB.NET Events An Event Procedure Properties and Event Procedures of the Form Tab Order of Controls Exercises.
Basic Systems and Software. Were we left off Computers are programmable (formal) machines. Digital information is stored as a series of two states (1.
1 Advanced Computer Programming Lab Calculator Project.
Chapter 3 - VB.NET by Schneider1 Chapter 3 – Fundamentals of Programming in VB.NET Part I VB.NET Controls VB.NET Events.
PseudocodeFORTRAN (original) INPUT number INPUT divisor intermediate = divisor intermediate
COPYRIGHT 2010: Dr. David Scanlan, CSUS OBJECTIVES: How to write classes How to create an object from a class using the "New" keyword. How to communicate.
Welcome to Technology Michael Cox October 20, 2015 Do now: Open your typing test data file Take a three minute typing test at Typingtest.com (Aesop test)
Creating Menus Menu Bar – behaves like standard Windows menus Can be used in place of or in addition to buttons to execute a procedure Menu items are controls.
Know what a computer is used for Understand the difference between hardware and software Be able to describe the way that data is stored in a computer.
Computer Basics.
© 2006 ITT Educational Services Inc. Introduction to Computer Programming: Unit 3: Chapter 3: Slide 1 Unit 3 Formatting Chapter 3 Input, Variables, Constants,
Chapter 31 Fundamentals of Programming in Visual Basic (VB) Visual Basic Events Simple Statement.
User Interface Programming in C#: Basics and Events Chris North CS 3724: HCI.
CIS 338: Events Dr. Ralph D. Westfall April, 2011.
Chapter 31 Fundamentals of Programming in Visual Basic (VB) Visual Basic Events Simple Statement.
Programming with Visual Basic.NET. Quick Links Program Code The Code Window The Event Procedure Assignment Statements Using AutoList Radio Buttons Buttons.
Computer Science Up Down Controls, Decisions and Random Numbers.
Dr. Abraham Professor UTPA Graphical User Interface.
Chapter 1: Introduction to Computers and Programming
Visual Basic Fundamental Concepts
Lecture 1: Introduction to JAVA
Chapter 8: Writing Graphical User Interfaces
Microsoft Visual Basic 2005: Reloaded Second Edition
Introduction to VB programming
Visual Basic..
Computer Parts.
Project Design, Forms and Buttons
Fundamentals of Programming in VB.Net
GUI Programming in Visual Studio .NET
Phil Harker & Norman Green
Presentation transcript:

Practical Programming COMP153-08S Lecture 1: Starting to program

Computers Central Processing Unit (CPU) –Pentium IV – 3GH (billion / sec) Main Memory (RAM) –512MB (512 books, 512 minutes music) –Holds running programs and their data Disk (Hard Drive) –80GB (80 movies) –Long term storage (with care)

Software (Programs) Operating system –The most complex thing ever built by the human mind –Interacts with you – interprets mouse clicks, etc –Keeps track of files –Allows several programs to run at the same time

Programming Don’t write individual computer instructions Use development environment Much is written for us We use libraries of useful behaviour and appearance and functionality

Programming Can Be Fun and creative Demanding –Often meticulous detail required Error prone –Very hard to get things just right Interacts interestingly with our personalities

Visual Basic (VB) Concepts: Control Property Event A whole program is quite large. Usually we don’t even look at it, let alone write it ourselves. We write ‘event’ handlers – sets of instructions (subroutines) to be run when something happens

Public Class Form1 Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents One As System.Windows.Forms.Button Friend WithEvents Two As System.Windows.Forms.Button Private Sub InitializeComponent() Me.One = New System.Windows.Forms.Button Me.Two = New System.Windows.Forms.Button Me.SuspendLayout() ' 'One ' Me.One.Location = New System.Drawing.Point(64, 64) Me.One.Name = "One" Me.One.Size = New System.Drawing.Size(120, 32) Me.One.TabIndex = 0 Me.One.Text = "I am called One" '

'Two ' Me.Two.Location = New System.Drawing.Point(64, 120) Me.Two.Name = "Two" Me.Two.Size = New System.Drawing.Size(112, 64) Me.Two.TabIndex = 1 Me.Two.Text = "My name is two" ' 'Form1 ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.ClientSize = New System.Drawing.Size(292, 266) Me.Controls.Add(Me.Two) Me.Controls.Add(Me.One) Me.Name = "Form1" Me.Text = "Form1" Me.ResumeLayout(False) End Sub #End Region Private Sub One_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles One.Click Two.Text = "I've been changed" Two.Width = 200 End Sub End Class

What we see/What we write Public Class Form1 Inherits System.Windows.Forms.Form.... Hidden lines of program Private Sub One_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles One.Click Two.Text = "I've been changed" Two.Width = 200 End Sub End Class

Subroutines Private Sub Albert() instructions End Sub Sub is short for Subroutine Group of instructions with a name

Assignment statement Something = some expression –Something: a property of a control Written controlname. propertyname –Some expression allows arithmetic and parenthesis Button2.Width = 400 Button2.Width = ( ) / 2

THE END