-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCustomerSystem.java
More file actions
76 lines (63 loc) · 2.79 KB
/
CustomerSystem.java
File metadata and controls
76 lines (63 loc) · 2.79 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import java.util.Scanner;
// More packages may be imported in the space below
class CustomerSystem {
public static void main(String[] args) {
// Please do not edit any of these variables
Scanner reader = new Scanner(System.in);
String userInput, enterCustomerOption, generateCustomerOption, exitCondition;
enterCustomerOption = "1";
generateCustomerOption = "2";
exitCondition = "9";
// More variables for the main may be declared in the space below
do {
printMenu(); // Printing out the main menu
userInput = reader.nextLine(); // User selection from the menu
if (userInput.equals(enterCustomerOption)) {
// Only the line below may be edited based on the parameter list and how you
// design the method return
enterCustomerInfo();
} else if (userInput.equals(generateCustomerOption)) {
// Only the line below may be edited based on the parameter list and how you
// design the method return
generateCustomerDataFile();
} else {
System.out.println("Please type in a valid option (A number from 1-9)");
}
} while (!userInput.equals(exitCondition)); // Exits once the user types
System.out.println("Program Terminated");
reader.close();
}
public static void printMenu() {
System.out.println("Customer and Sales System\n".concat("1. Enter Customer Information\n")
.concat("2. Generate Customer data file\n").concat("3. Report on total Sales (Not done in this part)\n")
.concat("4. Check for fraud in sales data (Not done in this part)\n").concat("9. Quit\n")
.concat("Enter menu option (1-9)\n"));
}
/*
* This method may be edited to achieve the task however you like. The method
* may not necessarily be a void return type
*/
public static void enterCustomerInfo() {
}
/*
* This method may be edited to achieve the task however you like. The method
* may not necessarily be a void return type
*/
public static void validatePostalCode() {
}
/*
* This method may be edited to achieve the task however you like. The method
* may not necessarily be a void return type
*/
public static void validateCreditCard() {
}
/*
* This method may be edited to achieve the task however you like. The method
* may not necessarily be a void return type
*/
public static void generateCustomerDataFile() {
}
/*******************************************************************
* ADDITIONAL METHODS MAY BE ADDED BELOW IF NECESSARY *
*******************************************************************/
}