Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft Imagine All KU students currently enrolled in a CS class are eligible to receive Microsoft software, including Operating Systems development.

Similar presentations


Presentation on theme: "Microsoft Imagine All KU students currently enrolled in a CS class are eligible to receive Microsoft software, including Operating Systems development."— Presentation transcript:

1 Microsoft Imagine All KU students currently enrolled in a CS class are eligible to receive Microsoft software, including Operating Systems development tools some application software Does not include MS Office Find more information from

2 GA office hours Graduate Assistants in GA Office (OM 255)
Fall 2017 Hours Mon-Thur 9:00am – 6:00pm Fri 9:00am – 3:00pm Feel free to come and ask questions about 135 assignments

3 Putty You can download Putty (on Windows) from
Download it to desktop or any folder you like Standalone program, no need to install Double click to run To configure Putty (?)

4 Computer Hardware

5 Computer hardware CPU (Central Processing Unit)
Main memory: fast access, temporary storage, smaller capacity RAM (Random Access Memory) Secondary memory: slow access, permanent storage, larger capacity Hard disc, flash drive, CD

6 Random Access Memory Know difference between Random access
content of a memory location address of a memory location Random access Given the address of a memory location Can access the location in one clock cycle Regardless of the location accessed in previous cycle Random access vs. Sequential access DVD vs. Video tape

7 Input/Output (I/0) devices
Input devices Keyboard, mouse, scanner, video cam, microphone Output devices Monitor, speaker, printer

8 Computer Programs A set of instructions (like a recipe)
Two kinds of programming languages Low-level language or Machine language High-level language (more human readable) C++, Java, etc.

9 Compiler A computer program Example Process
translates a program in high-level language into a program in machine language Example Process g++ hello.cpp a.out

10 Common elements of C++ language
Keywords Reserved words (~two dozen) Programmer-Defined Identifiers Variable, function Operators Arithmetic operators, logical operators

11 Common elements of C++ language
Syntax Grammar, rules that must be followed Learn to be detail-oriented Comments or Documentation Must follow the department’s standard

12 A sample program 1 // This program calculates the user's pay. 2 #include <iostream> 3 using namespace std; int main() 6 { double hours, rate, pay; // Get the number of hours worked cout << "How many hours did you work? "; cin >> hours; // Get the hourly pay rate cout << "How much do you get paid per hour? "; cin >> rate; // Calculate the pay pay = hours * rate; // Display the pay cout << "You have earned $" << pay << endl; return 0; 23 }

13 Key Words 1 // This program calculates the user's pay. 2 #include <iostream> 3 using namespace std; int main() 6 { double hours, rate, pay; // Get the number of hours worked cout << "How many hours did you work? "; cin >> hours; // Get the hourly pay rate cout << "How much do you get paid per hour? "; cin >> rate; // Calculate the pay pay = hours * rate; // Display the pay cout << "You have earned $" << pay << endl; return 0; 23 } Refer to Page 60

14 Programmer-Defined dentifiers
1 // This program calculates the user's pay. 2 #include <iostream> 3 using namespace std; int main() 6 { double hours, rate, pay; // Get the number of hours worked cout << "How many hours did you work? "; cin >> hours; // Get the hourly pay rate cout << "How much do you get paid per hour? "; cin >> rate; // Calculate the pay pay = hours * rate; // Display the pay cout << "You have earned $" << pay << endl; return 0; 23 }

15 Operators 1 // This program calculates the user's pay. 2 #include <iostream> 3 using namespace std; int main() 6 { double hours, rate, pay; // Get the number of hours worked cout << "How many hours did you work? "; cin >> hours; // Get the hourly pay rate cout << "How much do you get paid per hour? "; cin >> rate; // Calculate the pay pay = hours * rate; // Display the pay cout << "You have earned $" << pay << endl; return 0; 23 }

16 Punctuation 1 // This program calculates the user's pay. 2 #include <iostream> 3 using namespace std; int main() 6 { double hours, rate, pay; // Get the number of hours worked cout << "How many hours did you work? "; cin >> hours; // Get the hourly pay rate cout << "How much do you get paid per hour? "; cin >> rate; // Calculate the pay pay = hours * rate; // Display the pay cout << "You have earned $" << pay << endl; return 0; 23 }

17 Summary Computer hardware Programming language
CPU, RAM, Secondary memory, I/O Programming language Machine language, high-level language, compiler Basic components of a C++ program Keywords, programmer-defined ID, punctuation, operators, syntax, comments


Download ppt "Microsoft Imagine All KU students currently enrolled in a CS class are eligible to receive Microsoft software, including Operating Systems development."

Similar presentations


Ads by Google