assignment please help
***** The shop has the following items *****
There are 0 of Jaws - VHS in stock Running time is 95 minutes.
There are 8 of Jaws in stock Running time is 95 minutes. Number of discs is set is 1 Has the movie got additional features false
There are 0 of Shrek 2 in stock Running time is 102 minutes. Number of discs is set is 1 Has the movie got additional features true
There are 6 of NRL in stock Game platform is PS2 amd the Maximum number of players is 2
There are 11 of Doom in stock Game platform is PC amd the Maximum number of players is 2
There are 3 of AFL in stock Game platform is PS2 amd the Maximum number of players is 1
There are 0 of Jaws - VHS in stock Running time is 95 minutes.
There are 8 of Jaws in stock Running time is 95 minutes. Number of discs is set is 1 Has the movie got additional features false
There are 0 of Shrek 2 in stock Running time is 102 minutes. Number of discs is set is 1 Has the movie got additional features true
There are 6 of NRL in stock Game platform is PS2 amd the Maximum number of players is 2
There are 11 of Doom in stock Game platform is PC amd the Maximum number of players is 2
There are 3 of AFL in stock Game platform is PS2 amd the Maximum number of players is 1
***** The library has the following games for PS2 *****
There are 6 of NRL in stock Game platform is PS2 amd the Maximum number of players is 2
There are 3 of AFL in stock Game platform is PS2 amd the Maximum number of players is 1
***** The total number of sales from the library is $71.7 *****
***** The total items sold from the library is 3 *****
the expected is
*** The wholesaler contains the following items: ***
Movie Jaws - VHS price $12.0 stock:0 sold:0 Run-Time:95 mins
DVD Jaws price $12.0 stock:4 sold:6 Run-Time:95 mins no special features
DVD Shrek 2 price $14.95 stock:0 sold:0 Run-Time:102 mins special features
Game NRL price $29.5 stock:3 sold:2 Max Players:2 Platform:PS2
Game Doom price $30.2 stock:9 sold:1 Max Players:2 Platform:PC
Game AFL price $29.95 stock:2 sold:0 Max Players:1 Platform:PS2
*** The wholesaler has low stock (less than 3) of the following items: ***
Movie Jaws - VHS price $12.0 stock:0 sold:0 Run-Time:95 mins
DVD Shrek 2 price $14.95 stock:0 sold:0 Run-Time:102 mins special features
Game AFL price $29.95 stock:2 sold:0 Max Players:1 Platform:PS2
*** The wholesaler has the following games for PS2: ***
Game NRL price $29.5 stock:3 sold:2 Max Players:2 Platform:PS2
Game AFL price $29.95 stock:2 sold:0 Max Players:1 Platform:PS2
*** The wholesaler has sold 9 items for a total of $161.2 ***
*** Error - item AFL is already in the stock list ***
*** Error - there are not 5 copies of Jaws in stock ***
i thinking i need to make changes in my main wholesaler class which is
public class Wholesaler
{
private Vector<Item> mItems = new Vector<Item>();
public boolean addItem(Item newItem)
{
mItems.add(newItem);
return true;
}
public boolean findItem(String searchName)
{
boolean found=false;
for (Item nextItem : mItems)
{
if (nextItem.getName().equalsIgnoreCase
(searchName))
found = true;
else
found = false;
}
return found;
}
public void listItems()
{
System.out.println("***** The shop has the following items ***** ");
for (Item nextItem : mItems)
{
System.out.println(nextItem);
}
}
public void listlowStock(int threshhold)
{
int total = 0;
for (Item nextItem : mItems)
{
System.out.println(nextItem);
if (nextItem.getNuminStock() < threshhold);
}
}
public void listGamesbyPlatform(String platform)
{
System.out.println ();
System.out.println("***** The library has the following games for " + platform + " *****");
for (Item nextItem : mItems)
{
if (nextItem instanceof Game)
{
if (((Game)nextItem).getPlatform().equals(platform))
System.out.println(nextItem);
}
}
}
public void calcTotalSales()
{
int totalSold = 0;
double totalSales = 0.0;
for (Item nextItem : mItems)
{
totalSold += nextItem.getNumSold();
totalSales += nextItem.getNumSold()*nextItem.getPrice();
}
System.out.println ();
System.out.println("***** The total number of sales from the library is $" + totalSales + " *****");
System.out.println("***** The total items sold from the library is " + totalSold + " *****");
}
}
any help would be so helpful
thanks
alak

