Inventory Program

D

dh7taurus

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
 
J

Joshua Cranmer

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.
 
J

Joshua Cranmer

Joshua said:
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.
 
D

dh7taurus

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.
 
M

Mark Space

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.
 
A

Arved Sandstrom

Joshua said:
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
 
A

Arne Vajhøj

Arved said:
$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
 
L

Lew

Arne said:
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.
 
A

Arved Sandstrom

Lew said:
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.
 
G

Giovanni Azua

Joshua Cranmer said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top