- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestComputer.java
More file actions
Latest commit
30 lines (17 loc) · 662 Bytes
/
Copy pathTestComputer.java
File metadata and controls
30 lines (17 loc) · 662 Bytes
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
packagehomework2;
publicclassTestComputer {
publicstaticvoidmain(String[] args) {
ComputermyComputer = newComputer();
myComputer.totalNumbers(10);
System.out.println(" we need " + myComputer.count() + " Computer");
System.out.println(myComputer.Type);
//parameterized constructor object
Computerobj = newComputer(5, " MACS ");
obj.display();
ComputeryourComputer = newComputer();
yourComputer.totalNumbers(7);
System.out.println(" you need " + yourComputer.count()+ " Computer ");
System.out.println(" we need " + myComputer.count() + " Computer ");
Computer.component();
}
}