CSE 1340 Introduction to Computing Concepts Class 2.
-
Upload
bethany-quinn -
Category
Documents
-
view
214 -
download
0
Transcript of CSE 1340 Introduction to Computing Concepts Class 2.
![Page 1: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/1.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
CSE 1340CSE 1340Introduction to Computing ConceptsIntroduction to Computing Concepts Class 2 Class 2
![Page 2: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/2.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Review of course requirements: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
![Page 3: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/3.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Review of course requirements:Review of course requirements:
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 assignmentfor that week
• Interactive Class notes distributed
![Page 4: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/4.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Review of course requirements:Review of course requirements:Must enroll in a labLab sessions are mandatoryPop Quizzes cannot be made upHomework cannot be made upPrograms can be turned in late BUT
only 1 day late; no late points assessedMake-up exams only given if
documented excuse has been submitted BEFORE exam
![Page 5: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/5.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
CommunicationCommunicationOffice hoursvia email:
– Please identify yourselfBlackboard address
– http://courses.smu.edu (use your 8 digit smu id for your userid and password)
![Page 6: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/6.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Synchronization of passwordsSynchronization of passwordsYou 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.
![Page 7: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/7.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Class 02 objectivesClass 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.
![Page 8: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/8.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Computer Systems: Hardware and SoftwareComputer Systems: Hardware and Software
Hardware --- the equipment Software --- programs that run the equipment
![Page 9: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/9.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Computer Components-- Computer Components-- HardwareHardware
Arithmetic Logic Unit
Control Unit
Secondary (Auxiliary)
StorageDevice
Memory Unit ( RAM & Registers )
Central Processing Unit ( CPU ) Input Device
Output Device
Peripherals
![Page 10: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/10.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Memory UnitMemory 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.
![Page 11: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/11.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Central Processing UnitCentral 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.
![Page 12: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/12.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
PeripheralsPeripherals
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.
![Page 13: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/13.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
WHAT IS A PROGRAM?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
![Page 14: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/14.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
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 memory3. 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 memory5. Multiply hours by rate and store the result in
memory as gross pay6. Display the gross pay
A SET OF INSTRUCTIONS
Page 7
![Page 15: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/15.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Inside the Program
INPUTPROCESSING
OUTPUT
sum = sum + number;
number =keyboard.nextInt();
System.out.print(sum);
![Page 16: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/16.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
The Programming ProcessThe 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
![Page 17: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/17.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Program Development CycleProgram Development Cycle
![Page 18: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/18.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Phase 1 – Analyze the RequirementsPhase 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
![Page 19: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/19.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Phase 1 – Analyze the RequirementsPhase 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
![Page 20: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/20.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Requirements Document
p. 13
![Page 21: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/21.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Phase 2 – Design the SolutionPhase 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
![Page 22: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/22.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Phase 2 – Design the SolutionPhase 2 – Design the Solution
Storyboards are sketches of the user interface
![Page 23: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/23.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Phase 2 – Design the SolutionPhase 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
![Page 24: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/24.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Flowcharting symbols
p. 17
![Page 25: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/25.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
![Page 26: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/26.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Phase 2 – Design the SolutionPhase 2 – Design the Solution
Pseudocode is an English representation of how the program code should be written
![Page 27: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/27.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Phase 3 – Validate the DesignPhase 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
![Page 28: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/28.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Phase 4 – Implement the DesignPhase 4 – Implement the Design
Write the code that translates the design into a program
Create the user interfaceCreate comments within the code that
explains the purpose of the codeUnit testing
– Test the code as it is writtenTest related code
![Page 29: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/29.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Phase 4 – Implement the DesignPhase 4 – Implement the Design
![Page 30: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/30.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Phase 5 – Test the SolutionPhase 5 – Test the SolutionCreate a test plan with test cases of
sample input data and expected output Perform integration testing to ensure
that components interact correctlyTest boundary valuesDocument any problems
– If results are unsatisfactory, a new iteration of the development cycle begins
![Page 31: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/31.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Phase 6 – Document the SolutionPhase 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
![Page 32: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/32.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Programming languagesProgramming 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
![Page 33: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/33.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
– 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
![Page 34: CSE 1340 Introduction to Computing Concepts Class 2.](https://reader035.fdocuments.us/reader035/viewer/2022070323/56649e175503460f94b0355e/html5/thumbnails/34.jpg)
Cla
ss 2
~ C
hap
ter
1C
lass
2 ~
Ch
apte
r 1
Conclusion of Class 2Conclusion of Class 2