Graderpractice for programmers

254275 OOP - Pre Mini Test 2B 2/2563

Awaiting submission
Write a class named Krispykreme with fields for “branch”and “address”.
 public static void main(String[] args)
 {
    Krispykreme mixxiw = input();
    System.out.println("Krispykreme "+mixxiw.getBranch()+" Branch Location "+mixxiw.getAddress());
 }
 private static Krispykreme input()
 {
    Scanner pp = new Scanner(System.in);
    String branch = pp.nextLine();
    String address = pp.nextLine();
    return new Krispykreme(branch,address);
 }

Awaiting submission
Add a new method to the  Krispykreme  named toString that returns word to say hello people
Awaiting submission
Add method getNameofproduct to print orders and method getAmount to print amout that customers want
    public static void main(String[] args)
    {
      Krispykreme daddyjuniorx = input();
      System.out.println("You order is "+daddyjuniorx.getNameofproduct());
      System.out.println("Amount "+daddyjuniorx.getAmount());

    }
    private static Krispykreme input()
    {
      Scanner pp = new Scanner(System.in);
      String branch = pp.nextLine();
      String address = pp.nextLine();
      String Nameofproduct = pp.nextLine();
      int amount = Integer.parseInt(pp.nextLine());

      return new Krispykreme(branch,address,Nameofproduct,amount);
    }
Awaiting submission
Write a methods named Calacute that adds x create a price to the Krispykreme where x is a parameters
 public static void main(String[] args)
 {
      Scanner pp = new Scanner(System.in);
      String branch = pp.nextLine();
      String address = pp.nextLine();
      String Nameofproduct = pp.nextLine();
      int amount = Integer.parseInt(pp.nextLine());
      int price = Integer.parseInt(pp.nextLine());
      Krispykreme bbasjtr = new Krispykreme(branch,address,Nameofproduct,amount);
      System.out.println("Total price is "+bbasjtr.Calacute(price)+" bath");
  }
Awaiting submission
A Jambajuice is Affiliated business of the Krispykremel…. Create the Jambajuice class as a subclass of Krispykremel, with an extra field for store
public static void main(String[] args)
{
      Jambajuice iplann = input();
      System.out.println("Krispykreme Shop "+iplann.getBranch()+" Branch Location "+iplann.getAddress());
      System.out.println("This shop's name "+iplann.getStore());
}

  public static Jambajuice input()
  {
      Scanner pp = new Scanner(System.in);
      String branch = pp.nextLine();
      String address = pp.nextLine();
      String Nameofproduct = pp.nextLine();
      int amount = Integer.parseInt(pp.nextLine());
      String Store = pp.nextLine();
      return new Jambajuice(branch,address,Nameofproduct,amount,Store);
  }
Awaiting submission
Add a method called checkStore to the Krispykreme class returns true if it is store equals Jambajuice should accept input in any case
 public static void main(String[] args)
 {
       Jambajuice folktagram = input();
       if(folktagram.checkStore()==true)
       {
         System.out.println(folktagram.getStore()+" is a subsidiary of Krispy Kreme");
       }
       else
       {
         System.out.println(folktagram.getStore()+" isn't a subsidiary of Krispy Kreme");
       }
 }
   public static Jambajuice input()
   {
       Scanner pp = new Scanner(System.in);
       String branch = pp.nextLine();
       String address = pp.nextLine();
       String Nameofproduct = pp.nextLine();
       int amount = Integer.parseInt(pp.nextLine());
       String Store = pp.nextLine();
       return new Jambajuice(branch,address,Nameofproduct,amount,Store);
   }