-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOutput.java
More file actions
33 lines (26 loc) · 874 Bytes
/
Copy pathOutput.java
File metadata and controls
33 lines (26 loc) · 874 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
29
30
31
32
//Filename: Output.java
import java.io.*;
/** Output is a new class that will display the Receipt.
* @author Dursen Tulema*/
class Output
{
/** Construct a new Output.*/
static String fileName = "movies.txt";
void keyln (String fileName[][])
{
int item = 0;
DataInput d = new DataInputStream (System.in);
String input;
Receipt r = new Receipt();
try
{
System.out.println("Retype the movie name to confirm:");
System.out.println(fileName[0][0]);
while ((input = d.readLine()) != null)
{
System.out.println("Printing...\n");
r.printReceipt(fileName, input);
}
} catch (IOException ignore){}
}
}