I am trying to access SuperMarket class methods from the MMS class

I am trying to access SuperMarket class methods from the MMS class.

import java.util.ArrayList;

public class MMS {
private double totalCredits;
private double GasdeductionRate;
private double DollarAvailable;
private double deductionRate;
private double PayPerCredit;
private String name;
private double Expense;
private Memberships Memberships;
private ArrayList MMslips = new ArrayList();
private SuperMarket SuperMarket;

public MMS(){

}

public void mmsMenu(){
System.out.println(“MMS Menu: \nF- Find Slip Details\nV- View MMS Report\nA- Archive MMS Report\nR- Retrieve MMS Report\nS- Show MMS Log\nX- Close”);
char userChoice = Utils.choice(“Session Admin: ” + ” – Menu Commands (F/V/A/R/S/X)”);
while(userChoice!=’X’){
switch(userChoice){
case ‘F’: this.Memberships.slipDetails(); break;
case ‘V’:
case ‘A’:
case ‘R’:
case ‘S’:
}
userChoice = Utils.choice(“Session Admin: ” + name + ” – Menu Commands (F/V/A/R/S/X)”);
}
System.out.print(“\n”);
System.out.println(“SuperMarket Menu:”);
}

}

public class SuperMarket {

private String name;
private String email;
private String password;
private Memberships Memberships;
private MMSLog MMSLog;

public SuperMarket(String name, String email, String password){
this.name = name;
this.email = email;
this.password = password;
}
public String getName(){
return this.name;
}
public String getEmail(){
return this.email;
}
public String getPassword(){
return this.password;
}

public void adminMenu(){
System.out.println(“Admin Menu: \nC- Add Membership\nR- View Membership\nU- Update Membership\nD- Delete Membership\nV- View Memberships\nM- MMS Menu\nX- Logout”);
char userChoice = Utils.choice(“Session Admin: ” + this.name + ” – Menu Commands (C/R/U/D/V/M/X)”);
Memberships Membership = new Memberships();
MMSLog mmsLog = new MMSLog();
while(userChoice!=’X’){
switch(userChoice){
case ‘C’: Membership.addnewMembership(); break;
case ‘R’: Membership.retrieveMembership(); break;
case ‘U’: Membership.updateMembership(); break;
case ‘D’: Membership.removeMembership(); break;
case ‘V’: Membership.printMemberships(); break;
case ‘M’: mmsLog.logIn(); break;
}
userChoice = Utils.choice(“Session Admin: ” + this.name + ” – Menu Commands (C/R/U/D/V/M/X)”);
}
System.out.print(“\n”);
System.out.println(“MMS Management System:”);
}
}

Complete Answer:

Get Instant Help in Homework Asap
Get Instant Help in Homework Asap
Calculate your paper price
Pages (550 words)
Approximate price: -
Open chat
1
Hello 👋
Thank you for choosing our assignment help service!
How can I help you?