-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathMain.java
More file actions
30 lines (21 loc) · 893 Bytes
/
Main.java
File metadata and controls
30 lines (21 loc) · 893 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
package org.codedifferently;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
recieptcalculator recieptcalculator = new recieptcalculator();
Scanner scanner = new Scanner(System.in);
System.out.println("Welcome to Masons Tech Emporium!");
System.out.println("What is your name");
String name = scanner.nextLine();
System.out.println("What is your budget:");
double budget = scanner.nextDouble();
System.out.println("Enter your 5 digit rewards number");
double rewardnumber = scanner.nextInt();
if (rewardnumber == recieptcalculator.rewardsmemnum){
recieptcalculator.rewardmember = true;
System.out.println(recieptcalculator.generatethereceipt());
} else {
System.out.println(recieptcalculator.generatethereceipt());
}
}
}