Need JAVA programmers to write a java program on thursday december 4th @ 10:00am
ID: 3569120 • Letter: N
Question
Need JAVA programmers to write a java program on thursday december 4th @ 10:00am est to 11:50am est. Best Program will receive 6000 points total. By this post being worth 1500 points and then i will post the program problem three times each at 1500 Points. So look for java question around this time please! Thanks! It will be under a different name because i had to make two accounts but i will post links here and they will be posted around 10:00am est
Will post problem and links here:
Need JAVA programmers to write a java program on thursday december 4th @ 10:00am est to 11:50am est. Best Program will receive 4500 points total. By this post being worth 1500 points and then i will post the program problem twice each at 1500 Points. So look for java question around this time please! Thanks!Explanation / Answer
package car;
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 ");
//Get names of band boosters
System.out.print ("Enter the name of the first booster: ");
name = scan.nextLine();
booster1 = new BandBooster (name);
System.out.println ("Name of band Boosters :"+booster1.getName());
System.out.print ("Enter the name of the second booster: ");
name = scan.nextLine();
booster2 = new BandBooster (name);
System.out.println ("Name of band Boosters: "+booster2.getName());
//Get sales for week 1
for(int i=0;i<7;i++){
booster1.boxesSold(10);//daily ten boxes are sold for first band booster for first week
}
System.out.println ("Summary for first band booster for first week"+booster1.toString());
for(int i=0;i<7;i++){
booster1.boxesSold(20);//daily ten boxes are sold for first band booster for second week
}
System.out.println ("Summary for first band booster for second week"+booster1.toString());
// add your code here
//Get sales for week 2
for(int i=0;i<7;i++){
booster2.boxesSold(30);//daily 30 boxes are sold for second band booster for first week
}
System.out.println ("Summary for second band booster for first week"+booster1.toString());
for(int i=0;i<7;i++){
booster2.boxesSold(40);//daily 40 boxes are sold for second band booster for second week
}
System.out.println ("Summary for second band booster for second week"+booster1.toString());
// add your code here
// print summary for both band boosters.
System.out.println();
System.out.println ("Sales Totals");
System.out.println (booster1);
System.out.println (booster2);
}
}
package car;
public class BandBooster
{
// Instance variables
private String name;
private int boxesSold;
//----------------------------------------------------------------
// Constructor - sets up a band booster by initializing the name.
public BandBooster(String f){
this.name=f;
this.boxesSold=0;
}
public String getName(){
return this.name;
}
//----------------------------------------------------------------
public void boxesSold(int s){
this.boxesSold=this.boxesSold+s;
}
public String toString(){
String strI = Integer.toString(this.boxesSold);
return (this.name+":"+strI);
}
//add your code here.
//----------------------------------------------------------------
// getName method returns the name of the booster.
//----------------------------------------------------------------
//add your code here.
//----------------------------------------------------------------
// Updates the number of boxes of candy sold by adding the
// number specified in the parameter to the number sold so far.
//----------------------------------------------------------------
//add your code here.
//----------------------------------------------------------------
// Returns a string representation of a band booster.
//----------------------------------------------------------------
// add your code here.
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.