-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDistance.html
More file actions
107 lines (82 loc) · 1.58 KB
/
Copy pathDistance.html
File metadata and controls
107 lines (82 loc) · 1.58 KB
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
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang = "EN" xml:lang = "EN" dir = "ltr">
<head>
<meta http-equiv="content-type" content="text/xml; charset=utf-8" />
<title>Distance Calculation</title>
<link rel = "stylesheet"
type = "text/css"
href = "../ajhStandard.css" />
<style type = "text/css">
table, th, td {
border: 1px solid black;
}
table {
margin-left: auto;
margin-right: auto;
}
th {
text-align: left;
}
</style>
</head>
<body>
<h1>Distance Calculation</h1>
<div class = "block">
<p>
Consider a program that can calculate the distance between cities. The
program should ask for the city names and calculate the results based
on the following table:
</p>
<table>
<tbody><tr>
<th rowspan="6">f<br>r<br>o<br>m</th>
<th colspan="5"><center>to</center></th>
</tr>
<tr>
<th> </th>
<th>0) Indianapolis</th>
<th>1) New York</th>
<th>2) Tokyo</th>
<th>3) London</th>
</tr>
<tr>
<th>0) Indianapolis</th>
<td>0</td>
<td>648</td>
<td>6476</td>
<td>4000</td>
</tr>
<tr>
<th>1) New York</th>
<td>648</td>
<td>0</td>
<td>6760</td>
<td>3470</td>
</tr>
<tr>
<th>2) Tokyo</th>
<td>6476</td>
<td>6760</td>
<td>0</td>
<td>5956</td>
</tr>
<tr>
<th>3) London</th>
<td>4000</td>
<td>3470</td>
<td>5956</td>
<td>0</td>
</tr>
</tbody></table>
<p>
How would menus and arrays be used in such a program?
</p>
<p>
One possible solution is shown <a href = "DistanceCalc.java">here.</a>
The more important idea is the process.
</p>
</div>
</body>
</html>