Padd Solutions

Converted by Falcon Hive

import java.util.Scanner;

public class BandBooster
{
    public static void main (String[] args)
    {
        Scanner scan = new Scanner (System.in);
       
        String Name1, Name2;
        int boxesSold = 0;
       
       

        System.out.println ("Please enter the band booster's name: ");
        Name1 = scan.nextLine();
       
        System.out.println ("Please enter another band booster's name: ");
        Name2 = scan.nextLine();
       
       
        BoosterReturns Person2 = new BoosterReturns (Name2);
        BoosterReturns Person1 = new BoosterReturns (Name1);

        System.out.println ("Enter the number of boxes sold by " +Person1.getName()+ " this week.");
        boxesSold = scan.nextInt();
        Person1.updateSales (boxesSold);
       
        System.out.println ("Enter the number of boxes sold by " +Person2.getName()+ "this week.");
        boxesSold = scan.nextInt();
        Person2.updateSales (boxesSold);
       
       
       
        System.out.println ("SECOND WEEK");
        System.out.println ("How many has " +Person1.getName()+" sold?");
        boxesSold = scan.nextInt();
        Person1.updateSales (boxesSold);
       
        System.out.println ("How many has " +Person2.getName()+" sold?");
        boxesSold = scan.nextInt();
        Person2.updateSales (boxesSold);
       
       
        System.out.println ("THIRD WEEK");
        System.out.println ("How many has " +Person1.getName()+" sold?");
        boxesSold = scan.nextInt();
        Person1.updateSales (boxesSold);
       
        System.out.println ("How many has " +Person2.getName()+" sold?");
        boxesSold = scan.nextInt();
        Person2.updateSales (boxesSold);
       
        System.out.println (Person1);
        System.out.println (Person2);
    }
}

(2) Comments

  1. Anonymous On December 15, 2016 at 9:20 PM

    BoosterReturns Person2 = new BoosterReturns (bb2);
    BoosterReturns Person1 = new BoosterReturns (bb1);


    returns as null

     
    Anonymous On December 15, 2016 at 9:20 PM

    BoosterReturns Person2 = new BoosterReturns (bb2);
    BoosterReturns Person1 = new BoosterReturns (bb1);


    returns as null

     

Post a Comment