1 |
h02 |
CS16 F16 |
Name: | ||||
---|---|---|---|---|
(as it would appear on official course roster) | ||||
Umail address: | @umail.ucsb.edu | section 9am or 10:30am |
||
Optional: name you wish to be called if different from name above. | ||||
Optional: name of "homework buddy" (leaving this blank signifies "I worked alone" |
h02: Homework 2
ready? | assigned | due | points |
---|---|---|---|
true | Tue 09/27 02:00PM | Thu 09/29 02:00PM |
You may collaborate on this homework with AT MOST one person, an optional "homework buddy".
MAY ONLY BE TURNED IN IN THE LECTURE/LAB LISTED ABOVE AS THE DUE DATE,
OR IF APPLICABLE, SUBMITTED ON GRADESCOPE. There is NO MAKEUP for missed assignments;
in place of that, we drop the three lowest scores (if you have zeros, those are the three lowest scores.)
Please:
- No Staples.
- No Paperclips.
- No folded down corners.
Read Chapter 2, sections 2.1 thru 2.3 (If you don’t have a copy of the textbook yet, there is one on reserve at the library under “COMP000-STAFF - Permanent Reserve”).
-
1. (2 pts) What are the five main components of a computer?
2. (2 pts) What is the role of a compiler?
3. (2 pts) What is a source program?
4. (4 pts) Who is Ada Lovelace and why is she important to modern computers?
5. (10 pts) Comment on the phenomenon of moving from individual computers to networked computers and both the consequences and the importance of this trend for people's every day personal and work lives?
6. (2 pts) If the following statement were in a C++ program, what would it do?
cout >> "I love oranges and apples";
7. (2 pts) If the following statement were in a C++ program, what would it do?
cout << "The world goes round and round"
8. (16 pts) Complete this C++ program designed to calculate the area of a triange. The program gets the base and height parameters from the program user and should then print out a statement that says: "The area of this triangle is: some number here
#include <iostream>
using namespace std;
int main ()
{
int area, base, height;
...
}