This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Submit HW18, add source code in some homework directories
- Loading branch information
Showing
25 changed files
with
1,429 additions
and
897 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Microsoft Word | ||
~$*.docx* | ||
|
||
# draw.io | ||
*.drawio.bkp |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
class NuclearWasteStorage { | ||
int dangerLevel; | ||
Lock lock; | ||
|
||
void lockDoor() { | ||
int entryCode = lock.getEntryCode(); | ||
boolean safe; | ||
if (entryCode == lock.authorizedCode) { | ||
int shieldStatus = Shield.getStatus(); | ||
if (shieldStatus == Shield.inPlace()) { | ||
int radiationLevel = RadSensor.get(); | ||
if (radiationLevel < dangerLevel) { | ||
safe = true; | ||
} else { | ||
safe = false; | ||
} | ||
} else { | ||
safe = false; | ||
} | ||
|
||
if (safe) { | ||
Door.locked = false; | ||
Door.unlock(); | ||
} else { | ||
Door.lock(); | ||
Door.locked = true; | ||
} | ||
} | ||
} | ||
} | ||
|
||
class Shield { | ||
static int inPlace() { | ||
return 0; | ||
} | ||
|
||
static int getStatus() { | ||
return 0; | ||
} | ||
} | ||
|
||
class RadSensor { | ||
static int get() { | ||
return 0; | ||
} | ||
} | ||
|
||
class Door { | ||
static boolean locked; | ||
|
||
static void lock() { | ||
} | ||
|
||
static void unlock() { | ||
} | ||
} | ||
|
||
class Lock { | ||
int authorizedCode; | ||
|
||
int getEntryCode() { | ||
return 0; | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
assignments/hw12-13/figure2.drawio → assignments/hw12-13/figures.drawio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"browsing": { | ||
"request": { | ||
"date": "2024-07-15", | ||
"city": "New York", | ||
"state": "NY", | ||
"budget": 30 | ||
}, | ||
"response": { | ||
"date": "2024-07-15", | ||
"city": "New York", | ||
"state": "NY", | ||
"budget": 30, | ||
"attractions": [ | ||
{ | ||
"id": "nyc-museum2", | ||
"name": "Museum of Modern Art", | ||
"fee": 0 | ||
}, | ||
{ | ||
"id": "nyc-statue1", | ||
"name": "Statue of Liberty", | ||
"fee": 25 | ||
} | ||
] | ||
} | ||
}, | ||
"booking": { | ||
"request": { | ||
"date": "2024-07-15", | ||
"guest_count": 1, | ||
"attraction": { | ||
"id": "nyc-museum2", | ||
"name": "Museum of Modern Art", | ||
"open_time": "7:30:00", | ||
"close_time": "21:00:00" | ||
} | ||
}, | ||
"response": { | ||
"date": "2024-07-15", | ||
"guest_count": 1, | ||
"attraction": { | ||
"id": "nyc-museum2", | ||
"name": "Museum of Modern Art", | ||
"open_time": "7:30:00", | ||
"close_time": "21:00:00" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"request": { | ||
"departure_date": "2024-07-14", | ||
"return_date": "2024-07-17", | ||
"origin": "Chicago", | ||
"destination": "New York", | ||
"passengers": [ | ||
{ | ||
"name": "John Doe", | ||
"passport_no": "E00007730" | ||
} | ||
], | ||
"payment": { | ||
"amount": 80, | ||
"method": "VISA", | ||
"account": "0987654321" | ||
} | ||
}, | ||
"response": { | ||
"booking_id": "xa12gw3va0", | ||
"flights": [ | ||
{ | ||
"no": "BA212", | ||
"when": "2024-07-14", | ||
"from": "ORD", | ||
"to": "JFK" | ||
}, | ||
{ | ||
"no": "AB121", | ||
"when": "2024-07-21", | ||
"from": "JFK", | ||
"to": "ORD" | ||
} | ||
], | ||
"passengers": [ | ||
{ | ||
"name": "John Doe", | ||
"passport_no": "E00007730", | ||
"seat": "12C" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"request": { | ||
"check_in_date": "2024-07-14", | ||
"check_out_date": "2024-07-17", | ||
"room_count": 1, | ||
"hotel": { | ||
"name": "Hard Rock Hotel", | ||
"address": "159 West 48th St.", | ||
"city": "New York", | ||
"state": "NY" | ||
}, | ||
"payment": { | ||
"amount": 360, | ||
"method": "paypal", | ||
"account ": "johndoe" | ||
} | ||
}, | ||
"response": { | ||
"booking_id": "k12vzd80v2", | ||
"check_in_date": "2024-07-14", | ||
"check_out_date": "2024-07-17", | ||
"room_count": 1, | ||
"hotel": { | ||
"name": "Hard Rock Hotel", | ||
"address": "159 West 48th St.", | ||
"city": "New York", | ||
"state": "NY", | ||
"services": { | ||
"wifi": true, | ||
"breakfast": true, | ||
"room_service": true, | ||
"nightclub": false | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"request": { | ||
"time": "2024-07-14T13:00:00", | ||
"passenger_count": 2, | ||
"pickup_location": { | ||
"lat": 9.96233, | ||
"lng": 49.80404 | ||
}, | ||
"dropoff_location": { | ||
"lat": 6.11499, | ||
"lng": 50.67891 | ||
}, | ||
"payment": { | ||
"amount": 32, | ||
"method": "cash" | ||
} | ||
}, | ||
"response": { | ||
"booking_id": "9dvb1324bn", | ||
"time": "2024-07-14T13:00:00", | ||
"passenger_count": 2, | ||
"pickup_location": { | ||
"address": "959 N Western Ave", | ||
"city": "Chicago", | ||
"state": "IL", | ||
"lat": 9.96233, | ||
"lng": 49.80404 | ||
}, | ||
"dropoff_location": { | ||
"address": "O'Hare International Airport", | ||
"city": "Chicago", | ||
"state": "IL", | ||
"lat": 6.11499, | ||
"lng": 50.67891 | ||
} | ||
} | ||
} |
Oops, something went wrong.