-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStore.java
More file actions
40 lines (27 loc) · 1.28 KB
/
Copy pathStore.java
File metadata and controls
40 lines (27 loc) · 1.28 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
/* Follow the directions in the comments below to create a class that represents
* a typical grocery store. */
public class Store {
// Declare the following variables:
// A variable of type String that stores the name of the store
// A variable of type int that stores the number of departments in the store
// A variable of type boolean that shows whether the store is open
// A variable of type double that stores the price of gum at this store
// Here is a sample constructor: Fill in the content inside of the method to
// complete the constructor: (Note: don't use the same names for variables as the ones i use!)
public Store(String yourName, int numDepart, boolean openClose, double gum) {
}
// Complete this method to add one department to the store
public void addDepartment() {
}
// Complete this method to remove one department from the store
public void removeDepartment() {
}
// Complete this method to set the price of gum to a given value at this store
public void setGumValue(double newGum) {
}
// Write a new method of your own design
// In the main method, create instances of the store and test out all your
// methods to see if it works!
public static void main(String[] args) {
}
}