-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTextbookTester
More file actions
23 lines (22 loc) · 796 Bytes
/
TextbookTester
File metadata and controls
23 lines (22 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package Textbook;
public class TextbookTester {
public static void main(String[] args){
//Developing a new package into the tester class
Textbook t1 = new Textbook();
//Putting the values from the no argument method
t1.getNumOfChapter();
t1.getSubject();
t1.getNumOfPages();
//Use the detail method from the textbook class
t1.detail();
//prints the values of t1
System.out.println(t1);
Textbook t2 = new Textbook();
//Use the setters methods to change the values of the textbook packages
t2.setNumOfPages(3000);
t2.setSubject("Cooking");;
t2.setNumOfChapter(25);
//From the toString method in the textbook class
System.out.println(t2.toString());
}
}