forked from jreycid/JavaDebugging
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDebugPhoneBook.java
More file actions
22 lines (22 loc) · 540 Bytes
/
DebugPhoneBook.java
File metadata and controls
22 lines (22 loc) · 540 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import javax.swing.*;
public class DebugPhoneBook extends DebugBook
{
private String area
private String size
private final int CUTOFF = 30;
FixDebugPhoneBook(int pages, int city)
{
super(pages);
area = city;
if(pages < CUTOFF)
size = "big";
else
size = "small";
}
public void display()
{
JOptionPane.showMessageDialog(null,"The phone book for " + area +
" has " + pages + " pages.\nThat is a " +
size + " phone book.");
}
}