Inventory Program

Discussion in 'Java' started by dh7taurus@yahoo.com, Jun 12, 2009.

  1. Guest

    Hello Everyone,
    I am a beginner and have begun to create a InventoryProgram for class.
    I have created part one of this program with some errors, but now I
    have to modify it and need all the help I can get.
    I would appreciate anyone's help with this I can submit what I have
    done already and also supply you with the needed modifications.
    Part 2 is due tonight and Part 3 on Sunday
     
    , Jun 12, 2009
    #1
    1. Advertising

  2. wrote:
    > Hello Everyone,
    > I am a beginner and have begun to create a InventoryProgram for class.
    > I have created part one of this program with some errors, but now I
    > have to modify it and need all the help I can get.
    > I would appreciate anyone's help with this I can submit what I have
    > done already and also supply you with the needed modifications.
    > Part 2 is due tonight and Part 3 on Sunday


    I'm sure many people here would be willing to help you, if you paid
    current consultancy rates. I'll start the bidding at $500/hr.

    P.S. if you're asking us for homework help, you've missed the point of
    homework.

    --
    Beware of bugs in the above code; I have only proved it correct, not
    tried it. -- Donald E. Knuth
     
    Joshua Cranmer, Jun 12, 2009
    #2
    1. Advertising

  3. Joshua Cranmer wrote:
    > P.S. if you're asking us for homework help, you've missed the point of
    > homework.


    Sorry, if you're asking us to do your homework for you.

    --
    Beware of bugs in the above code; I have only proved it correct, not
    tried it. -- Donald E. Knuth
     
    Joshua Cranmer, Jun 12, 2009
    #3
  4. Guest

    On Jun 11, 8:51 pm, Joshua Cranmer <> wrote:
    > Joshua Cranmer wrote:
    > > P.S. if you're asking us for homework help, you've missed the point of
    > > homework.

    >
    > Sorry, if you're asking us to do your homework for you.
    >
    > --
    > Beware of bugs in the above code; I have only proved it correct, not
    > tried it. -- Donald E. Knuth


    Not asking for anyone to do my homework just help!!!!
     
    , Jun 12, 2009
    #4
  5. Guest

    On Jun 11, 9:32 pm, Patricia Shanahan <> wrote:
    > wrote:
    > > Hello Everyone,
    > > I am a beginner and have begun to create a InventoryProgram for class.
    > > I have created part one of this program with some errors, but now I
    > > have to modify it and need all the help I can get.
    > > I would appreciate anyone's help with this I can submit what I have
    > > done already and also supply you with the needed modifications.
    > > Part 2 is due tonight and Part 3 on Sunday

    >
    > For Part 2, I think you are going just have to go with your own best effort.
    >
    > For Part 3, try to work out what you are not understanding, and ask
    > questions. The easiest questions to answer have the form "Why does this
    > *very* short program do X. I was expecting it to do Y for reasons A, B,
    > and C.".
    >
    > Note that posting your actual partly complete homework and asking for
    > help with it would create ethical problems. Posting a very small program
    > that brings out some issue you are having does not.
    >
    > Seehttp://home.earthlink.net/~patricia_shanahan/beginner.htmlfor some
    > general advice.
    >
    > Patricia


    Hello All,
    I have written the app to the best of my ability and would like you to
    look it over and let me know if I am at least on the right track and
    give any help you deem necessary.
    Here is the program:
    //InventoryProgram1.java
    //import java.util.Scanner; // allow for input
    import java.util.Arrays;
    import java.util.Scanner;
    import java.lang.String;

    class Product {
    String Name;
    int itemNumber;
    int numberofunits;
    int priceperunit;


    public Product (String name, int itemNumber, int numberofunits,
    int priceperunit); {

    String Name = name;
    this.itemNumber = itemNumber;
    this.numberofunits = units;
    this.priceperunit = price;
    computeValueInventory ();
    }

    private void computeValueInventory () {
    Value = Units * price;
    }

    }


    public class InventoryProgram1 //declares public class inventory

    {

    public static void main(String args []) //starts the program

    {


    PRODUCT[] = new Product[3];

    product[0] = new PRODUCT(1, "StApler",45, 2,
    17.99 );//
    declares a new item
    // number, name
    // quantity, and price

    product[1] = new PRODUCT(2, "Calanders", 47, 4,
    12.99 );

    product[2] = new PRODUCT(3, "Toner", 49, 6, 19.99 );

    //added changes
    Inventory1 x = new Inventory1();
    x.sortPRODUCT(product);

    }// end main

    public void SortPRODUCT(PRODUCT[] the PRODUCT) {
    for (int index = 0; index < the PRODUCT.size - 1;
    index++) {

    String s1 = thePRODUCT[index].getProductName
    ();
    String s2 = thePRODUCT[index] +
    1].getProductName
    ();
    if (comparewords(s1, s2)) {
    PRODUCT temp = thePRODUCT[index];
    thePRODUCT[index] = thePRODUCT
    [index + 1];
    thePRODUCT[index + 1] = temp;
    index = -1;
    }
    }
    }

    private boolean comparewords(String s1, String s2) {
    boolean islarger = false;

    for (int index = 0; index < s1.length(); index++) {
    if (index < s2.length()) {
    if (s1.toLowerCase().charAT
    (index) > s2.toLowerCase().charAT(index)) {
    islarger = true;
    break;
    {
    if (s1.toLowerCase().charAT
    (index) < s2.toLowerCase().charAT(index) {

    break;
    {
    }else {
    return true;
    }
    }
    return islarger;
    }
    //end of changes

    } // end class Inventory1

    class PRODUCT // declares class inventory

    {

    private int itemName;// declares item number as in
    private String productTitle;// declares product title as
    string
    private int onHand; // declares on hand as int
    private double productCost;// declares cost as double

    public PRODUCT(int stockNumber, String title, int
    inStock,
    double price) // constructor
    {
    itemNumber = stockNumber;// intitiates stock
    number, title, instock, and
    // price
    productTitle = title;
    onHand = inStock;
    productCost = price;

    } //

    // set PRODUCT StockNumber //sets stock number
    public void seItemNumber(int stockNumber)

    {

    itemNumber = stockNumber;

    }

    public int getItemNumber() // class item number

    {

    return itemNumber; // returns item number
    } // end method get PRODUCT Item

    public void setProductTitle(String title) // set PRODUCT
    Title

    {
    productTitle = title;
    }

    public String getProductTitle() // gets and returns PRODUCT
    Title

    {
    return productTitle;
    }

    public void setOnHand(int inStock) // Set on hand

    {
    onHand = inStock;
    }

    public int getOnHand() // gets and returns on hand

    {
    return onHand;
    } //

    public void setProductCost(double price) // sets product cost

    {
    productCost = price;
    }

    public double getProductCost() // gets and returns PRODUCT
    cost

    {
    return productCost;
    }

    public double value() // calculate the value of stock

    {
    return productCost * onHand;
    }

    } // end class Product



    It is supposed to handle multiple items, use an array to store the
    items, display the information one product at a time, including the
    item number, the name of product, the number of units in stock, the
    price of each, and the value of the inventory of that product. It
    should also display the value of the entire inventory.
     
    , Jun 12, 2009
    #5
  6. Mark Space Guest

    wrote:

    > I have written the app to the best of my ability and would like you to
    > look it over and let me know if I am at least on the right track and
    > give any help you deem necessary.



    It's beyond any reasonable request for help. There are just too many
    syntax errors and undeclared variables to make sense of it. Patricia
    was right, turn in what you have for some partial credit and move on to
    the next part.
     
    Mark Space, Jun 12, 2009
    #6
  7. Joshua Cranmer wrote:
    > wrote:
    >> Hello Everyone,
    >> I am a beginner and have begun to create a InventoryProgram for class.
    >> I have created part one of this program with some errors, but now I
    >> have to modify it and need all the help I can get.
    >> I would appreciate anyone's help with this I can submit what I have
    >> done already and also supply you with the needed modifications.
    >> Part 2 is due tonight and Part 3 on Sunday

    >
    > I'm sure many people here would be willing to help you, if you paid
    > current consultancy rates. I'll start the bidding at $500/hr.


    $500/hr? :) You'd have to be the only guy available and stellar at what
    you do in order to charge that much, plus it'd be a short job at short
    notice and critical to the client.

    AHS
     
    Arved Sandstrom, Jun 12, 2009
    #7
  8. Arne Vajhøj Guest

    Arved Sandstrom wrote:
    > Joshua Cranmer wrote:
    >> wrote:
    >>> Hello Everyone,
    >>> I am a beginner and have begun to create a InventoryProgram for class.
    >>> I have created part one of this program with some errors, but now I
    >>> have to modify it and need all the help I can get.
    >>> I would appreciate anyone's help with this I can submit what I have
    >>> done already and also supply you with the needed modifications.
    >>> Part 2 is due tonight and Part 3 on Sunday

    >>
    >> I'm sure many people here would be willing to help you, if you paid
    >> current consultancy rates. I'll start the bidding at $500/hr.

    >
    > $500/hr? :) You'd have to be the only guy available and stellar at what
    > you do in order to charge that much, plus it'd be a short job at short
    > notice and critical to the client.


    I think lawyers specializing in mergers and acquisitions could
    easily do it.

    Or what may be more relevant in these times: lawyers specializing in
    bankruptcies.

    :)

    Arne
     
    Arne Vajhøj, Jun 13, 2009
    #8
  9. Lew Guest

    Arne Vajhøj wrote:
    > Arved Sandstrom wrote:
    >> Joshua Cranmer wrote:
    >>> wrote:
    >>>> Hello Everyone,
    >>>> I am a beginner and have begun to create a InventoryProgram for class.
    >>>> I have created part one of this program with some errors, but now I
    >>>> have to modify it and need all the help I can get.
    >>>> I would appreciate anyone's help with this I can submit what I have
    >>>> done already and also supply you with the needed modifications.
    >>>> Part 2 is due tonight and Part 3 on Sunday
    >>>
    >>> I'm sure many people here would be willing to help you, if you paid
    >>> current consultancy rates. I'll start the bidding at $500/hr.

    >>
    >> $500/hr? :) You'd have to be the only guy available and stellar at
    >> what you do in order to charge that much, plus it'd be a short job at
    >> short notice and critical to the client.

    >
    > I think lawyers specializing in mergers and acquisitions could
    > easily do it.
    >
    > Or what may be more relevant in these times: lawyers specializing in
    > bankruptcies.


    There are programmers worth that kind of money. I remember a database maven
    who was pulling down $300/hr or more back in 1996; that rate would translate
    to about $500/hr today.

    She was worth every farthing.

    --
    Lew
     
    Lew, Jun 13, 2009
    #9
  10. Lew wrote:
    > Arne Vajhøj wrote:
    >> Arved Sandstrom wrote:
    >>> Joshua Cranmer wrote:
    >>>> wrote:
    >>>>> Hello Everyone,
    >>>>> I am a beginner and have begun to create a InventoryProgram for class.
    >>>>> I have created part one of this program with some errors, but now I
    >>>>> have to modify it and need all the help I can get.
    >>>>> I would appreciate anyone's help with this I can submit what I have
    >>>>> done already and also supply you with the needed modifications.
    >>>>> Part 2 is due tonight and Part 3 on Sunday
    >>>>
    >>>> I'm sure many people here would be willing to help you, if you paid
    >>>> current consultancy rates. I'll start the bidding at $500/hr.
    >>>
    >>> $500/hr? :) You'd have to be the only guy available and stellar at
    >>> what you do in order to charge that much, plus it'd be a short job at
    >>> short notice and critical to the client.

    >>
    >> I think lawyers specializing in mergers and acquisitions could
    >> easily do it.
    >>
    >> Or what may be more relevant in these times: lawyers specializing in
    >> bankruptcies.

    >
    > There are programmers worth that kind of money. I remember a database
    > maven who was pulling down $300/hr or more back in 1996; that rate would
    > translate to about $500/hr today.
    >
    > She was worth every farthing.
    >

    Like I said - stellar, in short supply, and absolutely critical to the
    client.

    In my area the typical rate that a client will see, for general purpose
    work (real programming), is about CAN $100/hr (*). Special purpose
    consultants coming in for short gigs may bump that up to CAN $200 or
    $300 per hour. You'd have to be unique, indispensable and flawless to
    make $500/hr around here. :)

    To put things in perspective, an intermediate/senior programmer in my
    area (Nova Scotia) might make CAN $60K to $80K per year, which given our
    cost of living is better or much better than 6-figure USD salaries in
    many US urban areas.

    AHS

    * NOTE: that's through a company, and one with a good rep.
     
    Arved Sandstrom, Jun 13, 2009
    #10
  11. "Joshua Cranmer" <> wrote in message
    > I'm sure many people here would be willing to help you, if you paid
    > current consultancy rates. I'll start the bidding at $500/hr.
    >

    $500/hr wow! where do you live? :) that's a rate very hard to get for a Sr.
    developer even here in Switzerland where average contract daily rates used
    to be well above 1000.-CHF

    The two highest I have ever heard of were IBM Consultants costing 3500.-CHF
    per day but that was company-to-company deal, the guy would get a fraction
    of that. And one exception I remember, an Oracle top freelancer consultant,
    she charged 1K.-CHF per hour ... just to tell my boss after nearly two hours
    work that the issue was "an application problem" that's it :)

    1CHF ~ 0.92USD

    --
    Giovanni
     
    Giovanni Azua, Jun 18, 2009
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Inventory in ASP.

    , Jan 21, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    3,091
    =?Utf-8?B?RWx0b24gVw==?=
    Jan 21, 2006
  2. David Tuman

    directory inventory

    David Tuman, Feb 10, 2004, in forum: C++
    Replies:
    3
    Views:
    428
    Christoph Rabel
    Feb 10, 2004
  3. lalalala

    inventory databasing

    lalalala, May 26, 2006, in forum: Java
    Replies:
    1
    Views:
    812
    IchBin
    May 26, 2006
  4. Lisa Fong
    Replies:
    0
    Views:
    352
    Lisa Fong
    Feb 16, 2007
  5. =?Utf-8?B?UGF1bCBCdXp6YSwgb2xkc3RlciB1c2luZyBuZXcg

    Print Label on LOCAL Zebra Printer from WEBSITE Inventory DB

    =?Utf-8?B?UGF1bCBCdXp6YSwgb2xkc3RlciB1c2luZyBuZXcg, Apr 25, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    1,380
    Alexey Smirnov
    Apr 26, 2007
Loading...

Share This Page