Results 1 to 4 of 4
  1. #1
    ccfdet is offline Member
    Join Date
    Aug 2009
    Rep Power

    Question Need help with school work

    I need help with my school work. I have to do a program by Sunday night and I don't even know how to begin. The first part of the assignment os Creat 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). This is what I have so far. I don't know if it is right or not can someone please help?!?!?!?!

    * @(#)
    * Inventory application
    * @author
    * @version 1.00 2009/8/28
    import java.util.Scanner; //program uses class Scanner

    public class Inventory {

    //main method begins execution of Java application
    public static void main( String args [])
    //create scanner to obtain input from command window
    Scanner input = new Scannner( );

    int itemNumber; //item number
    int productNumber; //product number
    int unitsInStock; //first number to mulitply
    int priceOfEach; //second number to mylitply
    int total; //total of unitsInStock * priceOfEach

    System.out.print( "Enter item number: " );
    //promt itemNumber=input.nextInt(); read input from user

    System.out.print( "Enter product number: " );
    //promt productNumber=input.nextInt(); read input from user

    System.out.print( "Enter units in stock: " );
    //promt unitsInStock=input.nextInt(); read input from user

    System.out.print( "Enter price of each: " );
    //promt priceOfEach=input.nextInt(); read input from usre

    //multiply unitsInStock and priceOfEach to get total value of stock
    System.out.printf( "Total value of stock is %2f\n",total ); //display total amount

    }//end main method
    }//end class Inventory

  2. #2
    mrmatt1111's Avatar
    mrmatt1111 is offline Senior Member
    Join Date
    Aug 2009
    San Jose, CA, USA
    Rep Power


    Do you expect us to do it for you? Where is the fun in that? :P
    My Hobby Project: LegacyClone

  3. #3
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Rep Power


    Well then does it work as per the specifications? Did you compile and run it to see?

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Colombo, Sri Lanka
    Blog Entries
    Rep Power

Similar Threads

  1. Reord management for a school
    By 435.mahesh in forum Advanced Java
    Replies: 4
    Last Post: 03-22-2009, 03:59 PM
  2. school project help
    By justin8790 in forum New To Java
    Replies: 5
    Last Post: 03-22-2009, 10:54 AM
  3. Taking Java In School Need Help
    By xEuPhOrIcSx in forum New To Java
    Replies: 7
    Last Post: 02-04-2008, 09:02 AM
  4. Beginner Needs Help w/ Program for School
    By badness in forum New To Java
    Replies: 2
    Last Post: 11-24-2007, 08:51 PM
  5. Please help... assignment for school
    By confused2000 in forum New To Java
    Replies: 3
    Last Post: 11-12-2007, 09:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts