-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathTestBook3.java
More file actions
40 lines (32 loc) · 1.54 KB
/
Copy pathTestBook3.java
File metadata and controls
40 lines (32 loc) · 1.54 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
package src;
public class TestBook3 {
public static void main(String[] args)
{
Book3 aBook = new Book3("Java for dummy", 19.95, 1000);
// additional task #1
System.out.println("\nThe book: " + aBook);
System.out.println("The authors are:");
aBook.printAuthors();
System.out.println("\nThe book: " + aBook);
System.out.println("The authors are:");
aBook.printAuthors();
aBook.removeAuthorByName("Bruce Eckel");
System.out.println("\nThe book: " + aBook);
System.out.println("The authors are:");
aBook.printAuthors();
System.out.println("\nThe book: " + aBook);
System.out.println("The authors are:");
aBook.printAuthors();
// ATTENTION: here new author wouldn't be added !!! NO errors - see code of Book3.java
System.out.println("\nThe book: " + aBook);
System.out.println("The authors are:");
aBook.printAuthors();
}
}