FundRaising - name = scan.nextLine(); booster2 = new...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//********************************************************************* // FundRaising.java // // Tracks band candy sales of two band boosters over two weeks. //********************************************************************* import java.util.Scanner; public class FundRaising { //------------------------------------------------------- // Creates 2 band boosters and gets their sales of band // candy over a period of two weeks. Total sales // are computed for each band booster. //------------------------------------------------------- public static void main (String[] args) { String name; BandBooster booster1; BandBooster booster2; int numBoxes; Scanner scan = new Scanner(System.in); System.out.println ("Band Sales Program\n"); //Get names of band boosters System.out.print ("Enter the name of the first booster: "); name = scan.nextLine(); booster1 = new BandBooster (name); System.out.print ("Enter the name of the second booster: ");
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: name = scan.nextLine(); booster2 = new BandBooster (name); //Get sales for week 1 System.out.print ("Enter the number of boxes sold by " + booster1.getName() + " week 1: "); numBoxes = scan.nextInt(); booster1.updateSales(numBoxes); System.out.print ("Enter the number of boxes sold by " + booster2.getName() + " week 1: "); numBoxes = scan.nextInt(); booster2.updateSales(numBoxes); //Get sales for week 2 System.out.print ("Enter the number of boxes sold by " + booster1.getName() + " week 2: "); numBoxes = scan.nextInt(); booster1.updateSales(numBoxes); System.out.print ("Enter the number of boxes sold by " + booster2.getName() + " week 2: "); numBoxes = scan.nextInt(); booster2.updateSales(numBoxes); System.out.println(); System.out.println ("Sales Totals"); System.out.println (booster1); System.out.println (booster2); } }...
View Full Document

Page1 / 2

FundRaising - name = scan.nextLine(); booster2 = new...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online