Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Quiz
Write name on paper
5 points
2 MC questions
List number and letter
of correct answer
CSC 175 - Dr. Gary Locklair
1 which is a C++ assignment
A
B
C
D
CSC 175 - Dr. Gary Locklair
sum = num + 5;
cin >> value;
cout << “hi”;
// add values
2 the assignment statement
A calculates a value
B repeats statements
C supplies comments
D outputs information
CSC 175 - Dr. Gary Locklair
Programming Process
Written Assignment 2
due Monday
codewarrior project on M:
CSC 175 - Dr. Gary Locklair
Programming Process
Written Assignment 2
hint: build program in
“stages”
CSC 175 - Dr. Gary Locklair
Programming Process
Programming Language
control structures
determine order of
statement execution
CSC 175 - Dr. Gary Locklair
Control Structures
sequential
selection
repetition
CSC 175 - Dr. Gary Locklair
Sequence
executes statements in
order
default
CSC 175 - Dr. Gary Locklair
Sequential
{
cout << “what is the length of room?”;
cin >> length_ft;
cout << “what is the width of room?”;
cin >> width_ft;
area = length_ft * width_ft;
…
}
CSC 175 - Dr. Gary Locklair
Selection
getting program to
“choose”
if statment
CSC 175 - Dr. Gary Locklair
Read a program
ICS text page …
322 “kms conversion”
CSC 175 - Dr. Gary Locklair
selection - if structure
if (Task == 1)
{
yes (true)
}
else
{
no (false)
}
CSC 175 - Dr. Gary Locklair
if (Task == 1) yes (true)
cout << “Miles” << endl;
cin >> Miles;
Kms = M_T_K * Miles;
cout << “It is” << Kms <<
“kilometers” << endl;
CSC 175 - Dr. Gary Locklair
if (Task == 1) no (false)
cout << “Kms” << endl;
cin >> Kms;
Miles = K_T_M * Lms;
cout << “It is” << Miles <<
“miles” << endl;
CSC 175 - Dr. Gary Locklair
Repetition
automatically repeat
instructions
loop
ICS page 325 “loop to add
numbers”
CSC 175 - Dr. Gary Locklair
Systems Assignment 1
Class assessment
use sheet to grade each
brochure: A, B, C
30 seconds to assess
when “time,” pass
brochure on
CSC 175 - Dr. Gary Locklair