Skip to content

Commit eee6261

Browse files
Initial commit
0 parents  commit eee6261

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+4375
-0
lines changed

Output.txt

+1,011
Large diffs are not rendered by default.

README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# project-3
2+
3+
* Group Members: Sidhant Puntambekar, Brian Noble, Isaac Pyle
4+
5+
Simulation of daily tasks at your Friendly Neighborhood Music Store
6+
7+
Java JDK Version: 13.0.10
8+
9+
Assume that random products are clones of the original products, with modified sale price. Only randomized numerical values in the updated item.
10+
11+
Compile and Run using:
12+
13+
1. `cd project-3/` or navigate to project root directory
14+
2. `javac -d bin src/*.java`
15+
3. `cd bin/`
16+
4. `java main_class`
17+
18+
Our examples of the 6 OO Principles can be found here:
19+
1. Inheritance: See the Music.java file, line 18.
20+
2. Polymorphism: See the Accessories.java file, line 17
21+
3. Abstraction: See the Accessories.java file, line 18
22+
4. Encapsulation: See the Item.java file, line 24
23+
5. Cohesion: See the Person.java file, line 10
24+
6. Identity: See the Store.java file, line 4
25+
26+
Our examples of Design Patterns:
27+
1. Decorator: See the Decorator.java and Stringed.java files
28+
2. Strategy: See the TuneBehavior.java, ElectricTune.java, ManualTune.java, and HaphazardTune.java files
29+
3. Observer: See the Observer.java, Subject.java, Tracker.java, Logger.java, and Clerk.java files
30+
31+
32+
Add other assumptions here if necessary.
Binary file not shown.
Binary file not shown.
Binary file not shown.

UMLChanges.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
UML Changes Project 3
2+
3+
1. Updated observer class to work for data sent to both Tracker and Logger
4+
2. Updated decorator classes for Stringed instruments
5+
3. Updated strategy pattern tuning behaviors and Clerk behavior methods
6+
4. Broke up procedural code for Clerk algorithms such as open_store and clean_store
7+
5. Updated Clerk attributes to work with observer and strategy pattern

logger/Logger-1.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Logger wrote: Shaggy arrives at the store on Day 1
2+
Logger wrote: Shaggy is checking the register and there is 0.0
3+
Logger wrote: Shaggy withdrew 1000 dollars from the bank and the new balance in the register is 1000.0 dollars
4+
Logger wrote: The total number of items in the inventory is 60
5+
Logger wrote: The sum of today's inventory is 1156.0
6+
Logger wrote: The total number of items damaged in tuning is 0
7+
Logger wrote: The total number of items sold by Shaggy on day 1 is 4
8+
Logger wrote: The total number of items bought by Shaggy on day 1 is 3
9+
Logger wrote: Shaggy locked up the store and went home for the day

logger/Logger-10.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Logger wrote: Shaggy arrives at the store on Day 10
2+
Logger wrote: 3 number of items arrived at the store on Day 10
3+
Logger wrote: Shaggy is checking the register and there is 1946.06
4+
Logger wrote: The total number of items in the inventory is 50
5+
Logger wrote: The sum of today's inventory is 1084.5
6+
Logger wrote: The total number of items damaged in tuning is 3
7+
Logger wrote: The total number of items sold by Shaggy on day 10 is 3
8+
Logger wrote: The total number of items bought by Shaggy on day 10 is 1
9+
Logger wrote: Shaggy locked up the store and went home for the day

logger/Logger-11.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Logger wrote: Shaggy arrives at the store on Day 11
2+
Logger wrote: Shaggy is checking the register and there is 2037.7
3+
Logger wrote: The total number of items ordered is 3
4+
Logger wrote: The total number of items in the inventory is 48
5+
Logger wrote: The sum of today's inventory is 1034.1
6+
Logger wrote: The total number of items damaged in tuning is 0
7+
Logger wrote: The total number of items sold by Shaggy on day 11 is 3
8+
Logger wrote: The total number of items bought by Shaggy on day 11 is 1
9+
Logger wrote: The total number of items damaged in cleaning is 1
10+
Logger wrote: Shaggy locked up the store and went home for the day

logger/Logger-12.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Logger wrote: Velma arrives at the store on Day 12
2+
Logger wrote: Velma is checking the register and there is 2255.3
3+
Logger wrote: The total number of items ordered is 3
4+
Logger wrote: The total number of items ordered is 3
5+
Logger wrote: The total number of items in the inventory is 44
6+
Logger wrote: The sum of today's inventory is 886.1
7+
Logger wrote: The total number of items damaged in tuning is 1
8+
Logger wrote: The total number of items sold by Velma on day 12 is 2
9+
Logger wrote: The total number of items bought by Velma on day 12 is 3
10+
Logger wrote: Velma locked up the store and went home for the day

logger/Logger-13.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Logger wrote: Shaggy arrives at the store on Day 13
2+
Logger wrote: 3 number of items arrived at the store on Day 13
3+
Logger wrote: Shaggy is checking the register and there is 2089.8600000000006
4+
Logger wrote: The total number of items in the inventory is 48
5+
Logger wrote: The sum of today's inventory is 1018.3000000000001
6+
Logger wrote: The total number of items damaged in tuning is 0
7+
Logger wrote: The total number of items sold by Shaggy on day 13 is 4
8+
Logger wrote: The total number of items bought by Shaggy on day 13 is 2
9+
Logger wrote: Shaggy locked up the store and went home for the day

logger/Logger-15.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Logger wrote: Shaggy arrives at the store on Day 15
2+
Logger wrote: 6 number of items arrived at the store on Day 15
3+
Logger wrote: Shaggy is checking the register and there is 2262.4600000000005
4+
Logger wrote: The total number of items ordered is 3
5+
Logger wrote: The total number of items in the inventory is 52
6+
Logger wrote: The sum of today's inventory is 1114.6
7+
Logger wrote: The total number of items damaged in tuning is 1
8+
Logger wrote: The total number of items sold by Shaggy on day 15 is 5
9+
Logger wrote: The total number of items bought by Shaggy on day 15 is 2
10+
Logger wrote: Shaggy locked up the store and went home for the day

logger/Logger-16.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Logger wrote: Daphne arrives at the store on Day 16
2+
Logger wrote: Daphne is checking the register and there is 2315.2600000000007
3+
Logger wrote: The total number of items ordered is 3
4+
Logger wrote: The total number of items in the inventory is 49
5+
Logger wrote: The sum of today's inventory is 1060.6
6+
Logger wrote: The total number of items damaged in tuning is 0
7+
Logger wrote: The total number of items sold by Daphne on day 16 is 4
8+
Logger wrote: The total number of items bought by Daphne on day 16 is 2
9+
Logger wrote: Daphne locked up the store and went home for the day

logger/Logger-17.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Logger wrote: Shaggy arrives at the store on Day 17
2+
Logger wrote: 3 number of items arrived at the store on Day 17
3+
Logger wrote: Shaggy is checking the register and there is 2466.9600000000005
4+
Logger wrote: The total number of items in the inventory is 49
5+
Logger wrote: The sum of today's inventory is 1097.9
6+
Logger wrote: The total number of items damaged in tuning is 1
7+
Logger wrote: The total number of items sold by Shaggy on day 17 is 2
8+
Logger wrote: The total number of items bought by Shaggy on day 17 is 2
9+
Logger wrote: Shaggy locked up the store and went home for the day

logger/Logger-18.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Logger wrote: Velma arrives at the store on Day 18
2+
Logger wrote: 3 number of items arrived at the store on Day 18
3+
Logger wrote: Velma is checking the register and there is 2499.9600000000005
4+
Logger wrote: The total number of items in the inventory is 52
5+
Logger wrote: The sum of today's inventory is 1124.8999999999999
6+
Logger wrote: The total number of items damaged in tuning is 0
7+
Logger wrote: The total number of items sold by Velma on day 18 is 2
8+
Logger wrote: The total number of items bought by Velma on day 18 is 2
9+
Logger wrote: Velma locked up the store and went home for the day

logger/Logger-19.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Logger wrote: Velma arrives at the store on Day 19
2+
Logger wrote: Velma is checking the register and there is 2513.7600000000007
3+
Logger wrote: The total number of items ordered is 3
4+
Logger wrote: The total number of items in the inventory is 52
5+
Logger wrote: The sum of today's inventory is 1159.1
6+
Logger wrote: The total number of items damaged in tuning is 0
7+
Logger wrote: The total number of items sold by Velma on day 19 is 6
8+
Logger wrote: The total number of items bought by Velma on day 19 is 2
9+
Logger wrote: Velma locked up the store and went home for the day

logger/Logger-2.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Logger wrote: Daphne arrives at the store on Day 2
2+
Logger wrote: Daphne is checking the register and there is 1114.5
3+
Logger wrote: The total number of items in the inventory is 59
4+
Logger wrote: The sum of today's inventory is 1122.5
5+
Logger wrote: The total number of items damaged in tuning is 0
6+
Logger wrote: The total number of items sold by Daphne on day 2 is 6
7+
Logger wrote: The total number of items bought by Daphne on day 2 is 3
8+
Logger wrote: The total number of items damaged in cleaning is 1
9+
Logger wrote: Daphne locked up the store and went home for the day

logger/Logger-20.txt

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Logger wrote: Shaggy arrives at the store on Day 20
2+
Logger wrote: 3 number of items arrived at the store on Day 20
3+
Logger wrote: Shaggy is checking the register and there is 2928.9200000000005
4+
Logger wrote: The total number of items ordered is 3
5+
Logger wrote: The total number of items in the inventory is 48
6+
Logger wrote: The sum of today's inventory is 1008.1
7+
Logger wrote: The total number of items damaged in tuning is 0
8+
Logger wrote: The total number of items sold by Shaggy on day 20 is 1
9+
Logger wrote: The total number of items bought by Shaggy on day 20 is 3
10+
Logger wrote: The total number of items damaged in cleaning is 2
11+
Logger wrote: Shaggy locked up the store and went home for the day

logger/Logger-22.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Logger wrote: Velma arrives at the store on Day 22
2+
Logger wrote: Velma is checking the register and there is 2761.9200000000005
3+
Logger wrote: The total number of items ordered is 3
4+
Logger wrote: The total number of items in the inventory is 50
5+
Logger wrote: The sum of today's inventory is 1089.1000000000001
6+
Logger wrote: The total number of items damaged in tuning is 1
7+
Logger wrote: The total number of items sold by Velma on day 22 is 2
8+
Logger wrote: The total number of items bought by Velma on day 22 is 2
9+
Logger wrote: Velma locked up the store and went home for the day

logger/Logger-23.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Logger wrote: Shaggy arrives at the store on Day 23
2+
Logger wrote: 3 number of items arrived at the store on Day 23
3+
Logger wrote: Shaggy is checking the register and there is 2740.9200000000005
4+
Logger wrote: The total number of items ordered is 3
5+
Logger wrote: The total number of items in the inventory is 53
6+
Logger wrote: The sum of today's inventory is 1273.7
7+
Logger wrote: The total number of items damaged in tuning is 1
8+
Logger wrote: The total number of items sold by Shaggy on day 23 is 4
9+
Logger wrote: The total number of items bought by Shaggy on day 23 is 2
10+
Logger wrote: Shaggy locked up the store and went home for the day

logger/Logger-24.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Logger wrote: Daphne arrives at the store on Day 24
2+
Logger wrote: Daphne is checking the register and there is 2791.2200000000007
3+
Logger wrote: The total number of items ordered is 3
4+
Logger wrote: The total number of items in the inventory is 50
5+
Logger wrote: The sum of today's inventory is 1242.3999999999999
6+
Logger wrote: The total number of items damaged in tuning is 0
7+
Logger wrote: The total number of items sold by Daphne on day 24 is 3
8+
Logger wrote: The total number of items bought by Daphne on day 24 is 4
9+
Logger wrote: The total number of items damaged in cleaning is 3
10+
Logger wrote: Daphne locked up the store and went home for the day

logger/Logger-25.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Logger wrote: Daphne arrives at the store on Day 25
2+
Logger wrote: 3 number of items arrived at the store on Day 25
3+
Logger wrote: Daphne is checking the register and there is 2839.4200000000005
4+
Logger wrote: The total number of items in the inventory is 51
5+
Logger wrote: The sum of today's inventory is 1256.6
6+
Logger wrote: The total number of items damaged in tuning is 0
7+
Logger wrote: The total number of items sold by Daphne on day 25 is 4
8+
Logger wrote: The total number of items bought by Daphne on day 25 is 4
9+
Logger wrote: The total number of items damaged in cleaning is 4
10+
Logger wrote: Daphne locked up the store and went home for the day

logger/Logger-26.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Logger wrote: Shaggy arrives at the store on Day 26
2+
Logger wrote: 6 number of items arrived at the store on Day 26
3+
Logger wrote: Shaggy is checking the register and there is 2875.2200000000003
4+
Logger wrote: The total number of items in the inventory is 57
5+
Logger wrote: The sum of today's inventory is 1425.7
6+
Logger wrote: The total number of items damaged in tuning is 2
7+
Logger wrote: The total number of items sold by Shaggy on day 26 is 3
8+
Logger wrote: The total number of items bought by Shaggy on day 26 is 3
9+
Logger wrote: The total number of items damaged in cleaning is 3
10+
Logger wrote: Shaggy locked up the store and went home for the day

logger/Logger-27.txt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Logger wrote: Daphne arrives at the store on Day 27
2+
Logger wrote: Daphne is checking the register and there is 2943.32
3+
Logger wrote: The total number of items in the inventory is 57
4+
Logger wrote: The sum of today's inventory is 1386.6000000000001
5+
Logger wrote: The total number of items damaged in tuning is 0
6+
Logger wrote: The total number of items sold by Daphne on day 27 is 4
7+
Logger wrote: The total number of items bought by Daphne on day 27 is 1
8+
Logger wrote: Daphne locked up the store and went home for the day

logger/Logger-29.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Logger wrote: Daphne arrives at the store on Day 29
2+
Logger wrote: Daphne is checking the register and there is 3054.52
3+
Logger wrote: The total number of items ordered is 3
4+
Logger wrote: The total number of items in the inventory is 54
5+
Logger wrote: The sum of today's inventory is 1334.6000000000001
6+
Logger wrote: The total number of items damaged in tuning is 0
7+
Logger wrote: The total number of items sold by Daphne on day 29 is 5
8+
Logger wrote: The total number of items bought by Daphne on day 29 is 0
9+
Logger wrote: The total number of items damaged in cleaning is 5
10+
Logger wrote: Daphne locked up the store and went home for the day

logger/Logger-3.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Logger wrote: Shaggy arrives at the store on Day 3
2+
Logger wrote: Shaggy is checking the register and there is 1423.3
3+
Logger wrote: The total number of items ordered is 3
4+
Logger wrote: The total number of items in the inventory is 50
5+
Logger wrote: The sum of today's inventory is 992.5
6+
Logger wrote: The total number of items damaged in tuning is 0
7+
Logger wrote: The total number of items sold by Shaggy on day 3 is 6
8+
Logger wrote: The total number of items bought by Shaggy on day 3 is 2
9+
Logger wrote: Shaggy locked up the store and went home for the day

logger/Logger-30.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Logger wrote: Daphne arrives at the store on Day 30
2+
Logger wrote: 3 number of items arrived at the store on Day 30
3+
Logger wrote: Daphne is checking the register and there is 3213.52
4+
Logger wrote: The total number of items in the inventory is 49
5+
Logger wrote: The sum of today's inventory is 1285.6000000000001
6+
Logger wrote: The total number of items damaged in tuning is 0
7+
Logger wrote: The total number of items sold by Daphne on day 30 is 5
8+
Logger wrote: The total number of items bought by Daphne on day 30 is 2
9+
Logger wrote: Daphne locked up the store and went home for the day

logger/Logger-4.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Logger wrote: Shaggy arrives at the store on Day 4
2+
Logger wrote: 3 number of items arrived at the store on Day 4
3+
Logger wrote: Shaggy is checking the register and there is 1460.96
4+
Logger wrote: The total number of items ordered is 3
5+
Logger wrote: The total number of items in the inventory is 49
6+
Logger wrote: The sum of today's inventory is 1037.6
7+
Logger wrote: The total number of items damaged in tuning is 2
8+
Logger wrote: The total number of items sold by Shaggy on day 4 is 4
9+
Logger wrote: The total number of items bought by Shaggy on day 4 is 2
10+
Logger wrote: Shaggy locked up the store and went home for the day

logger/Logger-5.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Logger wrote: Daphne arrives at the store on Day 5
2+
Logger wrote: 3 number of items arrived at the store on Day 5
3+
Logger wrote: Daphne is checking the register and there is 1421.46
4+
Logger wrote: The total number of items in the inventory is 50
5+
Logger wrote: The sum of today's inventory is 1127.1
6+
Logger wrote: The total number of items damaged in tuning is 0
7+
Logger wrote: The total number of items sold by Daphne on day 5 is 8
8+
Logger wrote: The total number of items bought by Daphne on day 5 is 1
9+
Logger wrote: The total number of items damaged in cleaning is 2
10+
Logger wrote: Daphne locked up the store and went home for the day

logger/Logger-6.txt

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Logger wrote: Velma arrives at the store on Day 6
2+
Logger wrote: Velma is checking the register and there is 2050.96
3+
Logger wrote: The total number of items ordered is 3
4+
Logger wrote: The total number of items ordered is 3
5+
Logger wrote: The total number of items ordered is 3
6+
Logger wrote: The total number of items ordered is 3
7+
Logger wrote: The total number of items in the inventory is 39
8+
Logger wrote: The sum of today's inventory is 802.6
9+
Logger wrote: The total number of items damaged in tuning is 0
10+
Logger wrote: The total number of items sold by Velma on day 6 is 2
11+
Logger wrote: The total number of items bought by Velma on day 6 is 2
12+
Logger wrote: Velma locked up the store and went home for the day

logger/Logger-8.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Logger wrote: Daphne arrives at the store on Day 8
2+
Logger wrote: 9 number of items arrived at the store on Day 8
3+
Logger wrote: Daphne is checking the register and there is 1699.06
4+
Logger wrote: The total number of items ordered is 3
5+
Logger wrote: The total number of items in the inventory is 48
6+
Logger wrote: The sum of today's inventory is 1093.8
7+
Logger wrote: The total number of items damaged in tuning is 0
8+
Logger wrote: The total number of items sold by Daphne on day 8 is 2
9+
Logger wrote: The total number of items bought by Daphne on day 8 is 1
10+
Logger wrote: Daphne locked up the store and went home for the day

logger/Logger-9.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Logger wrote: Velma arrives at the store on Day 9
2+
Logger wrote: 3 number of items arrived at the store on Day 9
3+
Logger wrote: Velma is checking the register and there is 1889.06
4+
Logger wrote: The total number of items in the inventory is 49
5+
Logger wrote: The sum of today's inventory is 1059.8
6+
Logger wrote: The total number of items damaged in tuning is 0
7+
Logger wrote: The total number of items sold by Velma on day 9 is 2
8+
Logger wrote: The total number of items bought by Velma on day 9 is 1
9+
Logger wrote: Velma locked up the store and went home for the day

part_1_links.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Google Doc:https://docs.google.com/document/d/1I7Ioo0cH_zBlSzZtcznAMil23OVLjntiUMssVfJ0Uhs/edit
2+
3+
UML Diagram:https://lucid.app/lucidchart/689a62ee-337a-4d88-ad4f-758c9e37d35e/edit?beaconFlowId=CDF1738C18DB93AB&invitationId=inv_bddd9ab2-aa6f-45bd-861a-bc2f8d7714e8&page=HWEp-vi-RSFO#

project-3.iml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$">
6+
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
7+
</content>
8+
<orderEntry type="inheritedJdk" />
9+
<orderEntry type="sourceFolder" forTests="false" />
10+
</component>
11+
</module>

questions.txt

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Questions:
2+
How should we model time passing/days between orders? Do we need a separate calendar interface or class to do this
3+
Store does no tknow what time it is, need another class, have some sort of big containing class that holds the calander, the store, possibly employees as well.
4+
Make assumptions that will make code function, and comment them.
5+
Can also just be variable that counts days.
6+
Do we need a customer class?
7+
Ideally yes
8+
Do customers behave differently?
9+
Answer is yes
10+
Do we need to include constructors with every class we have in the UML diagram
11+
Yes
12+
Is there some way to reduce having to rewrite tostring() for each leaf class?
13+
Dont sweat it
14+
What kind of fields should instrument/clothing etc, have? Does it make sense to leave them empty and just be used for categorization?
15+
For now leave them empty, categorization
16+
Instead of StoreManagement interface, have big container to hold store/employees /calander to allow them to communicate
17+
No god class plz
18+
19+
20+
---------------------------------------------------------
21+
22+
Should I have a generate item method in each second level abstract class (Music, instrument, etc) and then override it in each concrete class?

0 commit comments

Comments
 (0)