Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE 1340 Introduction to Computing Concepts Class 2.

Similar presentations


Presentation on theme: "CSE 1340 Introduction to Computing Concepts Class 2."— Presentation transcript:

1 CSE 1340 Introduction to Computing Concepts Class 2

2 Review of course requirements: Homework due Tuesday at beginning of class-- no lates accepted Programming assignments due during lab hour or at the latest, 5pm the next day Student’s responsibility to have work turned in on-time or early. Programs and their associated files must be uploaded to Blackboard by the due date/time

3 Review of course requirements: –Incentives for coming to class lecture on Tuesdays and Thursdays Unannounced quizzes Unannounced fun logical quizzes and bonus opportunities given for getting back points lost on turned in homework assignment for that week Interactive Class notes distributed

4 Review of course requirements: Must enroll in a lab Lab sessions are mandatory Pop Quizzes cannot be made up Homework cannot be made up Programs can be turned in late BUT only 1 day late; no late points assessed Make-up exams only given if documented excuse has been submitted BEFORE exam

5 Communication Office hours via email: –Please identify yourself Blackboard address –http://courses.smu.edu (use your 8 digit smu id for your userid and password)

6 Synchronization of passwords You can change your password in Blackboard by going to your homepage and clicking on “change password” in the upper right-hand corner of the window.

7 Class 02 objectives List the basic components of a computer system Understand what a Computer Program is List the Programming Life-Cycle Phases Describe the characteristics of Java Explain the uses of Java and identify types of Java programs.

8 Computer Systems: Hardware and Software Hardware --- the equipment Software --- programs that run the equipment

9 Computer Components-- Hardware Arithmetic Logic Unit Control Unit Secondary (Auxiliary) Storage Device Memory Unit ( RAM & Registers ) Central Processing Unit ( CPU ) Input Device Output Device Peripherals

10 Memory Unit is an ordered sequence of storage cells, each capable of holding a piece of information each cell has its own unique address the information held can be input data, computed values, or your program instructions.

11 Central Processing Unit has 2 components to execute program instructions – Arithmetic/Logic Unit performs arithmetic operations, and makes logical comparisons. – Control Unit controls the order in which your program instructions are executed.

12 Peripherals are input, output, or auxiliary storage devices attached to a computer – Input Devices include keyboard and mouse. – Output Devices include printers, video display, LCD screens. – Auxiliary/Secondary Storage Devices include disk drives, scanners, CD-ROM and DVD-ROM drives, modems, sound cards, speakers, and digital cameras.

13 WHAT IS A PROGRAM? A program is a step-by-step series of instructions for a computer Computer programming is the process of writing these instructions Programmers, or developers, design and write programs using a programming language or development tool Java is a programming language that provides the structure for efficient and economical programs

14 1. Display a message on the screen asking “How many hours did you work?” 2. Wait for the user to enter the hours. Once the user enter the hours, store it in memory 3. Display a message on the screen that asks “How much do you get paid per hour?” 4. Wait for the user to enter the rate of pay. Once the user enters the rate, store it in memory 5. Multiply hours by rate and store the result in memory as gross pay 6. Display the gross pay A SET OF INSTRUCTIONS Page 7

15 Inside the Program INPUT PROCESSING OUTPUT sum = sum + number; number =keyboard.nextInt(); System.out.print(sum);

16 The Programming Process Analyze the requirements –Precisely define what problem is to be solved Design the solution –flowchart –pseudocode Validate the design Implement the design –Code the program Test (debug) the solution (compile/run) –Syntax errors –Logical errors Document the program

17 Program Development Cycle

18 Phase 1 – Analyze the Requirements Verify that the requirements are clear and complete Evaluate the problem to determine that it is solvable using a program List the required input and output data Determine whether the input data is available for testing

19 Phase 1 – Analyze the Requirements Ensure that a solution, or algorithm, can be developed with the information provided in the requirements Verify the user interface specifications

20 Requirements Document p. 13

21 Phase 2 – Design the Solution Develop a logical model that illustrates the sequence of steps you will take to solve the problem Use design tools such as storyboards, class diagrams, flowcharts, and pseudocode to outline the logic of the program

22 Phase 2 – Design the Solution Storyboards are sketches of the user interface

23 Phase 2 – Design the Solution Flowcharts graphically represent the logic used to develop an algorithm Control structures allow the programmer to specify the code that will execute only if a condition is met Flowcharts use pseudocode, English, or mathematical notation inside symbols to represent the steps of a solution

24 Flowcharting symbols p. 17

25

26 Phase 2 – Design the Solution Pseudocode is an English representation of how the program code should be written

27 Phase 3 – Validate the Design The programmer steps through the solution with test data The user agrees that the program design solves the problem put forth in the requirements The user verifies that the initial requirements document contains all necessary requirements

28 Phase 4 – Implement the Design Write the code that translates the design into a program Create the user interface Create comments within the code that explains the purpose of the code Unit testing –Test the code as it is written Test related code

29 Phase 4 – Implement the Design

30 Phase 5 – Test the Solution Create a test plan with test cases of sample input data and expected output Perform integration testing to ensure that components interact correctly Test boundary values Document any problems –If results are unsatisfactory, a new iteration of the development cycle begins

31 Phase 6 – Document the Solution Requirements documents, program design documents, user interface documents, and documentation of the code Test cases and proof of successful completion of testing Program code should be archived electronically

32 Programming languages A special language used to write computer instructions consisting of –Key Words Words that have a special meaning Can only be used for their inteded purpose. –Programmer-Defined Symbols Words or names defined by the programmer

33 –Operators Operators perform operations on one or more operands(a piece of data) –Punctuation Punctuation characters that mark the beginning of a statement, or separate items in a list –Syntax Rules that must be followed when constructing a program

34 Conclusion of Class 2


Download ppt "CSE 1340 Introduction to Computing Concepts Class 2."

Similar presentations


Ads by Google