Java: How to Program

Inventory Program Part 1

Page 1 of 1

1 Replies - 3607 Views - Last Post: 31 August 2007 - 10:48 PM Rate Topic: -----

#1 2609BFJ   User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 31-August 07

Java: How to Program

Post icon  Posted 31 August 2007 - 10:42 PM

Here is what I am being asked to do: 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.
• Post as an attachment.
I am taking my first Java programing course, I have read the matirial, BUT I still can not get this program to would here is what I have so far:
// InventoryProgramPart1 08/25/2007
// This program keeps trak of DVD's.

public class InventoryProgramPart1
{
   public static void main( String args[] )
   {
	  int array[] = { 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50 }; //declare array named array

	  System.out.printf( "%s %8s %8s%8s %8s\n", "Movie", "Movie Name", "Units In Stock", "Price", "Total Value" ); // column headings

	  //output array ellemt's value
	  for ( int counter = 1; counter < array.length; counter++ )
		 System.out.printf( "%5d%8d\n", counter, array[ counter ] );
   } //end main
} //end class InventoryProgramPart1
edit: code tags

I know it is not much but it is the best I can do. Can I Pls get some help?

This post has been edited by PennyBoki: 01 September 2007 - 09:27 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Java: How to Program

#2 Martyr2   User is offline

  • Programming Theoretician
  • member icon

Reputation: 5612
  • View blog
  • Posts: 14,686
  • Joined: 18-April 07

Re: Java: How to Program

Posted 31 August 2007 - 10:48 PM

Please look around the forum threads here in Java. We have helped numerous people with this exact project from phases 1 all the way through phase 5.

Hopefully you will find everything you need. :)

Here are some links to those other threads and their projects...

Mudpuppy's inventory project

Mardie513's inventory project (DVD specific)

Bigbluesky's product inventory thread

twin2003's Part 5 of the inventory project

This post has been edited by Martyr2: 31 August 2007 - 10:56 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1