--------------------------------------------------------------------------------
I am trying to correct the errors on an assignment that has already been graded because I have to now modify it and add to it for my next assignment. I dont want to go to my next assignment when I cannot even fix this error. The error and it is the only error I have thank goodness, says "reached end of file while parsing". Can anyone please take a look, thank you very much!
[CODE=Java]// HairColorInvent ory.Java
// Hair color program
import java.util.Scann er; // program uses class Scanner
public class HairColorInvent ory
{
// main method begins execution of Java application
public static void main( String args[] )
{
HairColor myHairColor = new HairColor();
String [] productNumber = {0011, 0012, 0013, 0014, 0015};
String [] itemName = {red, gold, blond, platinum, amber};
int [] numberofUnits = {100, 130, 99, 40, 44};
double [] priceperUnit = {75, 60, 55, 49, 52};
double [] inventoryValue;
double entireValue;
{
for (int i = 0; i < 5; i++)
{
// for loop to print the array of items, item numbers, number of units, price, and value
System.out.prin tln("\n\nitemNa me: "+itemName[i]);
//display item name
System.out.prin tln("productNum ber: "+productNu mber[i]);
//display item number
System.out.prin tln("Quantity in Stock: "+numberofU nits[i]);
//display quantity in stock
System.out.prin tln("Item Price:$ "+priceperU nit[i]);
//display item price
System.out.prin tIn(inventoryva lue[i] = numberofunits[i] * priceperunit[i]);
//calculate the inventory value of each item
System.out.prin tln("Value of Inventory:$ "+inventoryValu e[i]);
//display total value of inventory for this item
}
// end of for loop
for (int i = 0; i < 5; i++)
{
// for loop to calculate entire inventory value
entireValue = entirevalue + inventoryvalue[i];
// calculation of entire inventory value
}
System.out.prin tln("Entire inventory value:$ "+entireVal ue);
// display entire inventory value
Manufacturer.my Manufacturer();
// call subclass and display the manufacturer of the hair products
System.out.prin tln("The restocking fee of item " +itemName[1]+ ",product number " +productNumber[1]+ " is "+restockingFee (inventoryValue[1]));
// give the inventory restocking price for an item from the array by calling the restockingFee subclass
} // end main method
}}//end class HairColorInvent ory
public class Manufacturer extends HairColorInvent ory
{
public static void myManufacturer( )
{
System.out.prin tln
("Paul Mitchell is the Manufacturer of my Hair Inventory.");
}
public class RestockingFee
{
{
double reStockFee;
reStockFee = (oldInventoryCo st * .05) + oldInventoryCos t;
return reStockFee;
}
}[/CODE]
Here is my error:
C:\Documents and Settings\Owner\ My Documents\part3 .java:95: reached end of file while parsing
}
^
1 error
Tool completed with exit code 1
I am trying to correct the errors on an assignment that has already been graded because I have to now modify it and add to it for my next assignment. I dont want to go to my next assignment when I cannot even fix this error. The error and it is the only error I have thank goodness, says "reached end of file while parsing". Can anyone please take a look, thank you very much!
[CODE=Java]// HairColorInvent ory.Java
// Hair color program
import java.util.Scann er; // program uses class Scanner
public class HairColorInvent ory
{
// main method begins execution of Java application
public static void main( String args[] )
{
HairColor myHairColor = new HairColor();
String [] productNumber = {0011, 0012, 0013, 0014, 0015};
String [] itemName = {red, gold, blond, platinum, amber};
int [] numberofUnits = {100, 130, 99, 40, 44};
double [] priceperUnit = {75, 60, 55, 49, 52};
double [] inventoryValue;
double entireValue;
{
for (int i = 0; i < 5; i++)
{
// for loop to print the array of items, item numbers, number of units, price, and value
System.out.prin tln("\n\nitemNa me: "+itemName[i]);
//display item name
System.out.prin tln("productNum ber: "+productNu mber[i]);
//display item number
System.out.prin tln("Quantity in Stock: "+numberofU nits[i]);
//display quantity in stock
System.out.prin tln("Item Price:$ "+priceperU nit[i]);
//display item price
System.out.prin tIn(inventoryva lue[i] = numberofunits[i] * priceperunit[i]);
//calculate the inventory value of each item
System.out.prin tln("Value of Inventory:$ "+inventoryValu e[i]);
//display total value of inventory for this item
}
// end of for loop
for (int i = 0; i < 5; i++)
{
// for loop to calculate entire inventory value
entireValue = entirevalue + inventoryvalue[i];
// calculation of entire inventory value
}
System.out.prin tln("Entire inventory value:$ "+entireVal ue);
// display entire inventory value
Manufacturer.my Manufacturer();
// call subclass and display the manufacturer of the hair products
System.out.prin tln("The restocking fee of item " +itemName[1]+ ",product number " +productNumber[1]+ " is "+restockingFee (inventoryValue[1]));
// give the inventory restocking price for an item from the array by calling the restockingFee subclass
} // end main method
}}//end class HairColorInvent ory
public class Manufacturer extends HairColorInvent ory
{
public static void myManufacturer( )
{
System.out.prin tln
("Paul Mitchell is the Manufacturer of my Hair Inventory.");
}
public class RestockingFee
{
{
double reStockFee;
reStockFee = (oldInventoryCo st * .05) + oldInventoryCos t;
return reStockFee;
}
}[/CODE]
Here is my error:
C:\Documents and Settings\Owner\ My Documents\part3 .java:95: reached end of file while parsing
}
^
1 error
Tool completed with exit code 1
Comment