View Single Post

Old 10-06-06, 09:27   #2 (permalink)
PrinzII
Autopia Master Trooper
 
PrinzII's Avatar
 
PrinzII is offline
Join Date: Jul 2001
Location: Gilbert, AZ
Posts: 5,827
PrinzII is on a distinguished road
Send a message via ICQ to PrinzII Send a message via AIM to PrinzII Send a message via Yahoo to PrinzII
This is the code I have so far:

import java.io.*;
import java.text.*;

class inventory
{
//initialize variables
String TextInput = ""
String Performer = ""
String RecordLabel = ""
String Genre = ""
String Studio = ""
String ParentalAdvisory = ""
String Price = ""

//initialize array
int array []; //declare array

inventory array = new int[ 10 ]; //create the space for array

System.out.printf( "%s%8s\n" , "Performer" , "RecordLabel" , "Genre", "Studio" , "ParentalAdvisory" ); // column headings


Errors:

Inventory.java:10: ';' expected
String Performer = ""
^
Inventory.java:22: <identifier> expected
System.out.printf( "%s%8s\n" , "Performer" , "RecordLabel" , "Genre", "Studio" , "ParentalAdvisory" ); // column headings

Instructions:

Choose a product that lends itself to an inventory (for example, products at your workplace, office supplies, music CDs, DVD movies, or software).
• Create a product class that holds the item number, the name of the product, the number of units in stock, and the price of each unit.
• Create a Java application that displays the product number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory (the number of units in stock multiplied by the price of each unit). Pay attention to the good programming practices in the text to ensure your source code is readable and well documented.

I am really stuck!!
__________________
Shift_Cactus!
  Reply With Quote