-
Notifications
You must be signed in to change notification settings - Fork 0
/
Fair.java
38 lines (34 loc) · 844 Bytes
/
Fair.java
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
//Fair.java
//Max Smiley
//Program # 5
//CS202
import java.io.Serializable;
import java.util.Scanner;
//an event, with an ending day/time - as many fairs last multiple days.
public class Fair extends Event implements Serializable
{
private Time end;
protected Fair(){
super();
}
protected void read_console(){
super.read_console();
Scanner kb = new Scanner(System.in);
int m, d, t;
System.out.print("\nEnd day");
System.out.print("\n Month: ");
m = kb.nextInt();
kb.nextLine();
System.out.print("\n Day: ");
d = kb.nextInt();
kb.nextLine();
System.out.print("\n Time: ");
t = kb.nextInt();
kb.nextLine();
this.end = new Time(m, d, t);
}
protected void write_console(){
super.write_console();
System.out.println("\tEnds: " + end);
}
}