IT代写 NSW 2007

48024 assignment 1 MMS
Below is a sample I/O trace. Not every conceivable scenario is shown below and you should submit your code to ED to see what specific scenarios are tested. You should also implement your solution in the same order as ED’s test cases so that you can receive incremental feedback and marks as you progress.

Copyright By PowCoder代写 加微信 powcoder

Membership Management System:
Command (L/X): L
Password: super123
Admin Menu:
C- Add Membership
R- View Membership
U- Update Membership
D- Delete Membership
V- View Memberships
M- MMS Menu
Session Admin: – Menu Commands (C/R/U/D/V/M/X): C

========================================================================================================

Session Admin: – Menu Commands (C/R/U/D/V/M/X): C
Phone: 897574555
Address: 123 NSW 2007
ID: 14561234
expense: 200
record has been created.
Session Admin: – Menu Commands (C/R/U/D/V/M/X): V
+———————-+—————————+————+————+
| Membership Name | Email | Phone | Type |
+———————-+—————————+————+————+
| | | 99991111 | Gold |
| | | 88881111 | Diamond |
| | | 98981100 | Bronze |
| | | 90001222 | Platinum |
| | | 98980000 | Silver |
| | | 92241188 | Platinum |
| | | 897574555 | Bronze |
+———————-+—————————+————+————+
Session Admin: – Menu Commands (C/R/U/D/V/M/X): R
+———————-+—————————+————+————+
| Membership Name | Email | Phone | Type |
+———————-+—————————+————+————+
| | | 897574555 | Bronze |
+———————-+—————————+————+————+
Session Admin: – Menu Commands (C/R/U/D/V/M/X): R
record does not exist!
Session Admin: – Menu Commands (C/R/U/D/V/M/X): U
Updating record:
Phone: 898717232
Address: 123 NSW 2007
ID: 87651234
expense: 500
record has been updated.

Session Admin: – Menu Commands (C/R/U/D/V/M/X): V
+———————-+—————————+————+————+
| Membership Name | Email | Phone | Type |
+———————-+—————————+————+————+
| | | 99991111 | Gold |
| | | 88881111 | Diamond |
| | | 98981100 | Bronze |
| | | 90001222 | Platinum |
| | | 98980000 | Silver |
| | | 92241188 | Platinum |
| | | 898717232 | Silver |
+———————-+—————————+————+————+

Session Admin: – Menu Commands (C/R/U/D/V/T/X): D
Name: record does not exist!
Session Admin: – Menu Commands (C/R/U/D/V/T/X): D
record has been deleted.
Session Admin: – Menu Commands (C/R/U/D/V/M/X): ?
Admin Menu:
C- Add Membership
R- View Membership
U- Update Membership
D- Delete Membership
V- View Memberships
M- MMS Menu

Session Admin: – Menu Commands (C/R/U/D/V/M/X): M
F- Find Slip Details
V- View MMS Report
A- Archive MMS Report
R- Retrieve MMS Report
S- Show MMS Log

Session Admin: – Menu Commands (F/V/A/R/S/X): F
Slip Details:
+——————–+————-+————-+————-+————-+
| Membership Name | Expense | Credit | Dollars | Type |
+——————–+————-+————-+————-+————-+
| | 500.00 | 5000.00 | 25 | Silver |
+——————–+————-+————-+————-+————-+
Session Admin: – Menu Commands (F/V/A/R/S/X): V
MMS Report:
+——————–+————-+————-+————-+————-+
| Membership Name | Expense | Credit | Dollars | Type |
+——————–+————-+————-+————-+————-+
| | 2134.50 | 17076.00 | 85 | Gold |
| | 4512.20 | 27073.20 | 135 | Diamond |
| | 158.40 | 3168.00 | 15 | Bronze |
| | 7596.30 | 30385.20 | 151 | Platinum |
| | 1100.00 | 11000.00 | 55 | Silver |
| | 6741.20 | 26964.80 | 134 | Platinum |
| | 500.00 | 5000.00 | 25 | Silver |
+——————–+————-+————-+————-+————-+

+—————————-+—————+
| Total expense | 22742.60 |
| Total credits | 120667.20 |
| Total dollars | 600.00 |
| Average pay per credit | 8.86 |
| Average deduction rate | 0.16 |
| Average gas deduction rate | 0.21 |
+—————————-+—————+

Session Admin: – Menu Commands (F/V/A/R/S/X): A
MMS record is created as: 1
Session Admin: – Menu Commands (F/V/A/R/S/X): R
RecordID: 1
MMS Report:
+——————–+————-+————-+————-+————-+
| Membership Name | Expense | Credit | Dollars | Type |
+——————–+————-+————-+————-+————-+
| | 2134.50 | 17076.00 | 85 | Gold |
| | 4512.20 | 27073.20 | 135 | Diamond |
| | 158.40 | 3168.00 | 15 | Bronze |
| | 7596.30 | 30385.20 | 151 | Platinum |
| | 1100.00 | 11000.00 | 55 | Silver |
| | 6741.20 | 26964.80 | 134 | Platinum |
| | 500.00 | 5000.00 | 25 | Silver |
+——————–+————-+————-+————-+————-+

+—————————-+—————+
| Total expense | 22742.60 |
| Total credits | 120667.20 |
| Total dollars | 600.00 |
| Average pay per credit | 8.86 |
| Average deduction rate | 0.16 |
| Average gas deduction rate | 0.21 |
+—————————-+—————+

Session Admin: – Menu Commands (F/V/A/R/S/X): S
MMS Archive:
+————–+—————-+
| MMS Record | RecordID |
+————–+—————-+
| MMS 1 | 1 |
+————–+—————-+

Session Admin: – Menu Commands (F/V/A/R/S/X): X

SuperMarket Menu:
Session Admin: – Menu Commands (C/R/U/D/V/M/X): ?
Admin Menu:
C- Add Membership
R- View Membership
U- Update Membership
D- Delete Membership
V- View Memberships
M- MMS Menu
Session Admin: – Menu Commands (C/R/U/D/V/M/X): D
record has been deleted.
Session Admin: – Menu Commands (C/R/U/D/V/M/X): V
+———————-+—————————+————+————+
| Membership Name | Email | Phone | Type |
+———————-+—————————+————+————+
| | | 99991111 | Gold |
| | | 88881111 | Diamond |
| | | 98981100 | Bronze |
| | | 90001222 | Platinum |
| | | 98980000 | Silver |
| | | 92241188 | Platinum |
+———————-+—————————+————+————+

Session Admin: – Menu Commands (C/R/U/D/V/M/X): ?
F- Find Slip Details
V- View MMS Report
A- Archive MMS Report
R- Retrieve MMS Report
S- Show MMS Log
Session Admin: – Menu Commands (F/V/A/R/S/X): F
Slip details does not exist for !
Session Admin: – Menu Commands (F/V/A/R/S/X): V
MMS Report:
+——————–+————-+————-+————-+————-+
| Membership Name | Expense | Credit | Dollars | Type |
+——————–+————-+————-+————-+————-+
| | 2134.50 | 17076.00 | 85 | Gold |
| | 4512.20 | 27073.20 | 135 | Diamond |
| | 158.40 | 3168.00 | 15 | Bronze |
| | 7596.30 | 30385.20 | 151 | Platinum |
| | 1100.00 | 11000.00 | 55 | Silver |
| | 6741.20 | 26964.80 | 134 | Platinum |
+——————–+————-+————-+————-+————-+

+—————————-+—————+
| Total expense | 22242.60 |
| Total credits | 115667.20 |
| Total dollars | 575.00 |
| Average pay per credit | 8.67 |
| Average deduction rate | 0.17 |
| Average gas deduction rate | 0.22 |
+—————————-+—————+

Session Admin: – Menu Commands (F/V/A/R/S/X): A
MMS record is created as: 2
Session Admin: – Menu Commands (F/V/A/R/S/X): R
RecordID: 2
MMS Report:
+——————–+————-+————-+————-+————-+
| Membership Name | Expense | Credit | Dollars | Type |
+——————–+————-+————-+————-+————-+
| | 2134.50 | 17076.00 | 85 | Gold |
| | 4512.20 | 27073.20 | 135 | Diamond |
| | 158.40 | 3168.00 | 15 | Bronze |
| | 7596.30 | 30385.20 | 151 | Platinum |
| | 1100.00 | 11000.00 | 55 | Silver |
| | 6741.20 | 26964.80 | 134 | Platinum |
+——————–+————-+————-+————-+————-+

+—————————-+—————+
| Total expense | 22242.60 |
| Total credits | 115667.20 |
| Total dollars | 575.00 |
| Average pay per credit | 8.67 |
| Average deduction rate | 0.17 |
| Average gas deduction rate | 0.22 |
+—————————-+—————+

Session Admin: – Menu Commands (F/V/A/R/S/X): R
RecordID: 1
MMS Report:
+——————–+————-+————-+————-+————-+
| Membership Name | Expense | Credit | Dollars | Type |
+——————–+————-+————-+————-+————-+
| | 2134.50 | 17076.00 | 85 | Gold |
| | 4512.20 | 27073.20 | 135 | Diamond |
| | 158.40 | 3168.00 | 15 | Bronze |
| | 7596.30 | 30385.20 | 151 | Platinum |
| | 1100.00 | 11000.00 | 55 | Silver |
| | 6741.20 | 26964.80 | 134 | Platinum |
| | 500.00 | 5000.00 | 25 | Silver |
+——————–+————-+————-+————-+————-+

+—————————-+—————+
| Total expense | 22742.60 |
| Total credits | 120667.20 |
| Total dollars | 600.00 |
| Average pay per credit | 8.86 |
| Average deduction rate | 0.16 |
| Average gas deduction rate | 0.21 |
+—————————-+—————+

Session Admin: – Menu Commands (F/V/A/R/S/X): S
MMS Archive:
+————–+—————-+
| MMS Record | RecordID |
+————–+—————-+
| MMS 1 | 1 |
| MMS 2 | 2 |
+————–+—————-+
Session Admin: – Menu Commands (F/V/A/R/S/X): A
MMS record is created as: 3
Session Admin: – Menu Commands (F/V/A/R/S/X): S
MMS Archive:
+————–+—————-+
| MMS Record | RecordID |
+————–+—————-+
| MMS 1 | 1 |
| MMS 2 | 3 |
| MMS 3 | 3 |
+————–+—————-+
Session Admin: – Menu Commands (F/V/A/R/S/X): R
RecordID: 2
No MMS is recorded as: 2
Session Admin: – Menu Commands (F/V/A/R/S/X): X

SuperMarket Menu:
Session Admin: – Menu Commands (C/R/U/D/V/M/X): X

MMS Management System:
Command (L/X): X

Session Terminated!

Skeleton code

import java.util.*;

public class Utils{
private static final Scanner scanner = new Scanner(System.in);
public static final String mmsFormat = “| %-18s | %-13.2f | %-13.2f | %-13d | %-8s |%n”;
public static final String membershipFormat = “| %-20s | %-25s | %-10s | %-10s |%n”;
public static final String sumFormat = “| %-26s | %-11.2f |%n”;
public static final String logFormat = “| %-12s | %-11s |%n”;

public static String string(String prompt){
System.out.print(prompt+”: “);
return scanner.nextLine();

public static char choice(String prompt){
System.out.print(prompt+”: “);
return scanner.nextLine().charAt(0);

public static double amount(String prompt){
System.out.print(prompt+”: “);
double value = scanner.nextDouble();
scanner.nextLine();
return value;

public static boolean check(String prompt){
System.out.print(prompt+”: “);
String s=scanner.nextLine();
if (!s.equals(“2022AUT”))//promo code
return false;
return true;

public static int number(String prompt){
System.out.print(prompt+”: “);
int value = scanner.nextInt();
scanner.nextLine();
return value;

public static String formattedValue(String symbol, double value){
return String.format(symbol+”%.2f”, value);

public static void membershipHeader( ){
System.out.format(“+———————-+—————————+————+————+%n”);
System.out.format(“| Membership Name | Email | Phone | Type |%n”);
System.out.format(“+———————-+—————————+————+————+%n”);
public static void membershipTableEnd(){
System.out.format(“+———————-+—————————+————+————+%n”);
public static void slipTableEnd()
System.out.format(“+——————–+—————+—————+—————+———-+%n”);
public static void Totalslipheader()
System.out.println(“MMS Report: “);
System.out.format(“+——————–+—————+—————+—————+———-+%n”);
System.out.format(“| Membership Name | Expense | Credit | Dollars | Type |%n”);
System.out.format(“+——————–+—————+—————+—————+———-+%n”);
public static void TotalslipTableEnd()
System.out.format(“+——————–+—————+—————+—————+———-+%n”);

public static void slipHeader( ){
System.out.println(“Slip Details:”);
System.out.format(“+——————–+—————+—————+—————+———-+%n”);
System.out.format(“| Membership Name | Expense | Credit | Dollars | Type |%n”);
System.out.format(“+——————–+—————+—————+—————+———-+%n”);

public static void TotalSumHeader()
System.out.format(“+—————————-+—————+%n”);
public static void TotalSumTableEnd()
System.out.format(“+—————————-+—————+%n”);
public static void logHeader( ){
System.out.println(“MMS Archive:”);
System.out.format(“+————–+—————-+%n”);
System.out.format(“| MMS Record | RecordID |%n”);
System.out.format(“+————–+—————-+%n”);
public static void LogTableEnd()
System.out.format(“+————–+—————-+%n”);

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com