Download presentation
Presentation is loading. Please wait.
1
CS 117 Section 2 + KNET Computer accounts –Emailed to KNET students –Change password Homework 1 Lab Tutors –In lab for next 2 weeks –Will help you with Linux, vi, email subscription
2
Basic Programming What does a C++ program look like How do you use your computer account
3
Linux Use your user name and password to log into emerald Use passwd command to change your password
4
4 Processing a Program t Editor used to enter the program –Source program (file.cpp) –UNIX vi text editor t Compiler translates the source program –Displays syntax errors (not descriptive) t Linker/Loader to combine object file with other object files –Executable program
5
5 Processing a Program t Major activities –Editing - vi or other text editor vi hello.cpp –Compiling/Linking - one step with g++ on emerald g++ hello.cpp g++ -o hello hello.cpp –Running - type the executable name a.out hello
6
shell.cpp /* shell.cpp */ #include int main( void) { cout << "The first line of text" << endl; return 0; }
7
input and output I/O in C++ uses streams cout << "some text" << endl; cin >> someVar;
8
Program output cout is standard output stream –monitor << is an operator that inserts data into an output stream –outStream << data Text in double quotes is a constant string –“Hello, World!”
9
Program input cin is standard input stream –keyboard >> is an operator that extracts data from an input stream –inStream >> variable
10
10 1.5 Software Development Method t Problem Analysis - (Correct Problem) –Identify data objects –Goal to model properties –Determine Input / Output data –Constraints on the problem t Design –Decompose into smaller problems –Top-down design (divide and conquer) –Develop Algorithm (Desk check)
11
11 Software Development Method t Implementation –Writing the algorithm t Testing –Verify the program meets requirements –System and Unit test t Documentation –Key part in the development process
12
12 Software Development Method t Software engineering –Area of computer science concerned with building large software systems t Challenge –Tremendous advances in hardware have not been accompanied by comparable advances in software
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.