CS101- Lecture 11 CS101 Fall 2004 Course Introduction Professor Douglas Moody –Monday – 12:00-1:40 – – –Web Site: websupport1.citytech.cuny.edu Click on Technology and Design Select My page –Office Hours Monday: 6-7 pm Friday: 5-6 pm and by appointment Prerequisite: Enthusiasm about computers
CS101- Lecture 12 CS101 Fall 2004 Text Book –Programming Right from the Start with Visual Basic.Net Updated, Edition by Crews- MurphyMillspaugh, Prentice-Hall Publishers Attendance : Mandatory, maximum of 10% absence
CS101- Lecture 13 CS101 Fall 2004 Grading –Tests (19%) –Midterm(19%) –Final (31%) –Programs(31%) (Homework Assignments) Programs / Homeworks must done in order to succeed in the course Plan on 1 and ½ hours of non class time for the course
CS101- Lecture 14 CS101 Fall 2004 Objectives Learn how computer solve problems and perform tasks Understand the concepts behind computer programs Develop some basic programming skills Have fun making the computer work for you
CS101- Lecture Logic and Syntax A computer program is a solution to a problem. An algorithm is the logical design used to accomplish a specific objective. The Visual Logic Development System combines the utility of flowcharts and pseudocode with computer simulation.
CS101- Lecture Logic and Syntax (cont.) Syntax refers to the specific rules of a programming language. An information system is a combination of people and technology that collect, organize, and process data to produce information.
CS101- Lecture Logic and Syntax (cont.) An information system must do at least three things: –input data into the system –process data within the system –output resulting information from the system
CS101- Lecture “Hello World”
CS101- Lecture “Hello World” (cont.)
CS101- Lecture “Hello World” (cont.)
CS101- Lecture Input Statements An input statement accepts data from the user and stores that data into a variable. A variable is a storage location that can be accessed and changed by developer code.
CS101- Lecture Input Statements (cont.)
CS101- Lecture Input Statements (cont.)
CS101- Lecture 114 Simple Programming Formats
CS101- Lecture Weekly Paycheck Program The weekly paycheck program has two input variables: Hours and Rate
CS101- Lecture Assignment Statements The assignment statement can be used to perform a calculation and store the result. An expression is a value-returning code element, such as a variable or mathematical formula.
CS101- Lecture 117 How to Write Arithmetic Expressions
CS101- Lecture 118 How to Write Arithmetic Expressions (cont.)
CS101- Lecture Output Statements Types of output include –Screen output –Printed output –Sound output –Saving to storage devices
CS101- Lecture Output Statements (cont.)
CS101- Lecture Output Statements (cont.)
CS101- Lecture 122 Intrinsic Functions Intrinsic functions are predefined commands that provide developers with common, helpful functionality.
CS101- Lecture 123 Intrinsic Functions (cont.)
CS101- Lecture Debugging with Visual Logic A programming mistake is often called a bug.
CS101- Lecture 125 Chapter Summary Variables are storage locations used for holding input and processing information. Each variable has two components: its name and its value. Input statements are used to get data into variables. Expressions are value-returning code elements.
CS101- Lecture 126 Chapter Summary (cont.) Assignment statements are used to perform calculations and store the result. Output statements are used to display information. Input, assignment, and output statements are sufficient to write small programs.