summaryrefslogtreecommitdiff
path: root/assignments/5-solution.md
blob: d1822bd6c9cd61594fb5ff3494384a8be1e9a37e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# COMP-200: Intro to Computer Systems
## Assignment 5
### mo khan - 3431709

Choose ONE exercise each from Chapters 13, 14, 15, and 16

Chapter 13:

> 2. Look up the definition of the terms computer-aided design (abbreviated CAD)
> and computer-aided manufacturing (CAM). Find out what they mean, how they are
> used, and how they relate to the ideas presented in this chapter.

Computer aided design uses computers to help produce designs that can be
modified and optimized at a much faster rate than can be done manually. CAD
software can be used to redesign the layout of homes without needing to
physically alter the home. This type of modeling allows for faster iterations
and allows for experimentation that would be more costly and time consuimg to do
in the real world. This type of design relates to this chapter because this type
of computer aided modeling assists with simulating the real world.

Computer aided manufacturing (CAM) is used to improve the speed and accuracy of
production of manufactured goods. I don't think this type of design is as
closely related to this chapter because it assists with the production of goods
rather than running simulations. CAD can be used to design a manufacturing
system that is aided by computers but I don't think that CAM itself is a type of
computer modeling.

Chapter 14:

> 4. Using the Employees table of Figure 14.6, what is the result of the
> following SQL query? `SELECT * FROM Employees WHERE HoursWorked < 100;`

Figure 14.6

```plaintext
Employees

| ID  | LastName | FirstName | Birthdate  | PayRate | HoursWorked |
| --  | -------- | --------- | ---------  | ------- | ----------- |
| 116 | Kay      | Janet     | 3/22/1976  | $16.60  | 94          |
| 123 | Perreira | Francine  | 8/15/1989  | $8.50   | 185         |
| 149 | Takasano | Frederick | 5/23/1986  | $12.35  | 250         |
| 171 | Kay      | John      | 11/17/1984 | $17.80  | 245         |
| 165 | Honou    | Morris    | 6/9/1993   | $6.70   | 53          |
```

The result of executing the query is:

```sql
SELECT *
FROM Employees
WHERE HoursWorked < 100;
```

```
| ID  | LastName | FirstName | Birthdate  | PayRate | HoursWorked |
| --  | -------- | --------- | ---------  | ------- | ----------- |
| 116 | Kay      | Janet     | 3/22/1976  | $16.60  | 94          |
| 165 | Honou    | Morris    | 6/9/1993   | $6.70   | 53          |
```

Chapter 15: Artificial Intelligence

> 4. In the following neural network, which event or events cause node N3 to fire?

```plaintext
1 --1---|
        V
      (N1 2) ------2----|
        A               |
        |               |
2 --2---|               V
                      (N3 3) ----->
3 --1---|               A
        V               |
      (N2 2) ------2----|
        A
        |
4 --2---|
```

N3 will fire when the following events occurr:

| 1 | 2 | 3 | 4 |
| - | - | - | - |
| X | X | X | X |
| X | X | - | X |
| - | X | X | X |
| - | X | - | X |

* X: is On
* -: is Off

Chapter 16: Computer Graphics and Entertainment: Movies, Games and Virtual Communities

> Given the following triangular model of a two-dimensional object:
> show what a vertex list representation of this model would look like.
> Because you are working in two dimensions rather than three, your vertex list
> will only have (x, y) coordinates rather than (x, y, z). Assume vertex v1 is
> the origin

| Origin | Vertex | X   | Y   | Connected to |
| ------ | ------ | -   | -   | ------------ |
| X      | V1     | 0   | 0   | V2, V4, V5   |
|        | V2     | 0.4 | 1.8 | V1, V3, V5   |
|        | V3     | 2.2 | 1.9 | V2, V4, V5   |
|        | V4     | 2.6 | 0.4 | V1, V3, V5   |