next up previous
Up: Return

Hello World

Group: Captain: Recorder: Reflector:

Motivation

Some problems are best addressed using computer programs. Learning how to compile and run a program will make you a more well-rounded engineer.

Objectives

1.
Access the computer.
2.
Access the C++ compiler.
3.
Locate the help facility.
4.
Write a basic program that writes ``Hello World'' on the screen.
5.
Experiment with the program.
6.
E-mail the program to your instructor and the group.

Performance Criteria

1.
Production of the message. (60%)
2.
Success in E-mailing your program to your instructor and the reflector. (10%)
3.
The knowledge demonstrated by your definitions of the vocabulary. (10%)
4.
The depth of understanding demonstrated by your answers to the critical thinking questions. (20%)

Resources

1.
The textbook, especially ``Creating Your First Program'' and ``Taking a Closer Look at C++''.
2.
The online help facilities of windows and the compiler.

Plan

1.
Follow the instructions given.
2.
See what vocabulary you can define.
3.
See what critical thinking questions you can answer.
4.
Take the test and submit it.

Vocabulary

Select the best answer:

1.
Interactive:
(a)
The computer acts upon your instructions
(b)
The computer immediately reponds to your actions

2.
Program source:
(a)
A set of commands you want to give to the computer. Probably found in a .cpp file if you use C++.
(b)
Translating commands into a language the computer's Central Processing Unit (CPU) can understand. Ordinarily produces object (.obj) files.
(c)
The process of combining object files into an file that the computers's CPU can execute. Ordinarily produces am executable (.exe) file.
(d)
The complete process of converting a program source into an file that the computers's CPU can execute. Typically produces a .exe file as the final result from one or more .cpp and header (.h) files.

3.
Compile:
(a)
A set of commands you want to give to the computer. Probably found in a .cpp file if you use C++.
(b)
Translating commands into a language the computer's Central Processing Unit (CPU) can understand. Ordinarily produces object (.obj) files.
(c)
The process of combining object files into an file that the computers's CPU can execute. Ordinarily produces am executable (.exe) file.
(d)
The complete process of converting a program source into an file that the computers's CPU can execute. Typically produces a .exe file as the final result from one or more .cpp and header (.h) files.

4.
Link:
(a)
A set of commands you want to give to the computer. Probably found in a .cpp file if you use C++.
(b)
Translating commands into a language the computer's Central Processing Unit (CPU) can understand. Ordinarily produces object (.obj) files.
(c)
The process of combining object files into an file that the computers's CPU can execute. Ordinarily produces am executable (.exe) file.
(d)
The complete process of converting a program source into an file that the computers's CPU can execute. Typically produces a .exe file as the final result from one or more .cpp and header (.h) files.

5.
Build:
(a)
A set of commands you want to give to the computer. Probably found in a .cpp file if you use C++.
(b)
Translating commands into a language the computer's Central Processing Unit (CPU) can understand. Ordinarily produces object (.obj) files.
(c)
The process of combining object files into an file that the computers's CPU can execute. Ordinarily produces am executable (.exe) file.
(d)
The complete process of converting a program source into an file that the computers's CPU can execute. Typically produces a .exe file as the final result from one or more .cpp and header (.h) files.

6.
Bug:
(a)
A mistake that causes the program not to run.
(b)
A mistake that causes the program not to run correctly.

7.
Execute:
(a)
Having the CPU compile the .cpp file
(b)
Having the CPU execute the .exe file

Critical Thinking Questions

Select the best answer:

1.
How is the help facility important?
(a)
It tells you where to find help
(b)
It gives helpful information

2.
The program text you see on the screen is:
(a)
the source file
(b)
the executable program

3.
Does the Central Processing Unit (CPU) on the computer understand C++?
(a)
Yes
(b)
No

4.
If you want to run your program again, do you have to recompile it?
(a)
Yes
(b)
No

5.
What happens if you leave out the include line?
(a)
The source file cannot be saved
(b)
The program will not compile
(c)
The compiled executable will not run

6.
Typing Hello Word! instead of Hello World! is
(a)
a syntax error
(b)
a bug

7.
Typing cout <<< instead of cout << is
(a)
a syntax error
(b)
a bug

Exercises

1.
How would you ring the bell or clear the screen?
2.
Can you change the color of your text?
3.
Is the order of the program of importance?

Assessment

1.
Give two strengths of your group.
2.
Indicate two areas for improvement.
3.
What two new insights did your group obtain?
4.
Give two strengths of the class so far.
5.
Indicate two areas for improvement of the class.
6.
What two new insights did you obtain about the class?

next up previous
Up: Return
Author: Leon van Dommelen