The Artima Developer Community
Sponsored Link

Java Answers Forum
major HELP needed for program

1 reply on 1 page. Most recent reply: Sep 16, 2003 9:40 PM by mausam

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Nicole

Posts: 1
Nickname: nickoley
Registered: Sep, 2003

major HELP needed for program Posted: Sep 16, 2003 8:23 PM
Reply to this message Reply
Advertisement
I am having major problems with this program I have to implement for a class project. Can anyone help???

Here is a sample run:


Enter the number of Warehouses: 2

Enter the information about warehouse: 1 :

Enter the warehouse name: Marsh
Enter the address: Kinser Pike, Bloomington, In
Enter the number of items stocked in: 2

Enter the information for item 1 :
Enter the Item name: Cereal
Enter the UPC: 390323212
Enter the Price: 2.5
Enter the Quantity: 2

Enter the information for item 2 :
Enter the Item name: Orange Juice
Enter the UPC: 3090239421
Enter the Price: 3.99
Enter the Quantity: 1

Enter the information about warehouse: 2 :

Enter the warehouse name: Walmart
Enter the address: 2nd St. Bloomington, IN
Enter the number of items stocked in: 2

Enter the information for item 1 :
Enter the Item name: Sony Laptop
Enter the UPC: 3909992901
Enter the Price: 1899.99
Enter the Quantity: 1

Enter the information for item 2 :
Enter the Item name: Bike
Enter the UPC: 380809321
Enter the Price: 299.79
Enter the Quantity: 2

--------------------------------------
Main Menu:
1. Buy an item
2. Return an item
3. Display Warehouse information
4. List of Items bought
5. Exit
--------------------------------------
Select an option: 3

List of warehouses in the town:
1. Marsh, Kinser Pike, Bloomington, In
2. Walmart, 2nd St. Bloomington, IN

Select the warehouse: 1

Displaying Warhouse Information:
Name: Marsh
Address: Kinser Pike, Bloomington, In
The items' information stocked in:

Item: Cereal
UPC: 390323212
Price: 2.5
Quantity: 2
-----------------

Item: Orange Juice
UPC: 3090239421
Price: 3.99
Quantity: 1
-----------------

Press Enter for Main Menu........

--------------------------------------
Main Menu:
1. Buy an item
2. Return an item
3. Display Warehouse information
4. List of Items bought
5. Exit
--------------------------------------
Select an option: 1

List of warehouses in the town:
1. Marsh, Kinser Pike, Bloomington, In
2. Walmart, 2nd St. Bloomington, IN

Select the warehouse: 1
List of items stocked in the warehouse:
1. Cereal
2. Orange Juice
3. None
Select the item to buy: 2
Enter the quantity: 1

The order is fulfilled

Press Enter for Main Menu........

--------------------------------------
Main Menu:
1. Buy an item
2. Return an item
3. Display Warehouse information
4. List of Items bought
5. Exit
--------------------------------------
Select an option: 1

List of warehouses in the town:
1. Marsh, Kinser Pike, Bloomington, In
2. Walmart, 2nd St. Bloomington, IN

Select the warehouse: 2
List of items stocked in the warehouse:
1. Sony Laptop
2. Bike
3. None
Select the item to buy: 1
Enter the quantity: 1

The order is fulfilled

Press Enter for Main Menu........

--------------------------------------
Main Menu:
1. Buy an item
2. Return an item
3. Display Warehouse information
4. List of Items bought
5. Exit
--------------------------------------
Select an option: 3

List of warehouses in the town:
1. Marsh, Kinser Pike, Bloomington, In
2. Walmart, 2nd St. Bloomington, IN

Select the warehouse: 2

Displaying Warhouse Information:
Name: Walmart
Address: 2nd St. Bloomington, IN
The items' information stocked in:

Item: Sony Laptop
UPC: 3909992901
Price: 1899.99
Quantity: 0
-----------------

Item: Bike
UPC: 380809321
Price: 299.79
Quantity: 2
-----------------

Press Enter for Main Menu........

--------------------------------------
Main Menu:
1. Buy an item
2. Return an item
3. Display Warehouse information
4. List of Items bought
5. Exit
--------------------------------------
Select an option: 1

List of warehouses in the town:
1. Marsh, Kinser Pike, Bloomington, In
2. Walmart, 2nd St. Bloomington, IN

Select the warehouse: 2
List of items stocked in the warehouse:
1. Sony Laptop
2. Bike
3. None
Select the item to buy: 2
Enter the quantity: 2

The order is fulfilled

Press Enter for Main Menu........

--------------------------------------
Main Menu:
1. Buy an item
2. Return an item
3. Display Warehouse information
4. List of Items bought
5. Exit
--------------------------------------
Select an option: 3

List of warehouses in the town:
1. Marsh, Kinser Pike, Bloomington, In
2. Walmart, 2nd St. Bloomington, IN

Select the warehouse: 2

Displaying Warhouse Information:
Name: Walmart
Address: 2nd St. Bloomington, IN
The items' information stocked in:

Item: Sony Laptop
UPC: 3909992901
Price: 1899.99
Quantity: 0
-----------------

Item: Bike
UPC: 380809321
Price: 299.79
Quantity: 0
-----------------

Press Enter for Main Menu........

--------------------------------------
Main Menu:
1. Buy an item
2. Return an item
3. Display Warehouse information
4. List of Items bought
5. Exit
--------------------------------------
Select an option: 4

List of items bought until now:
1. Orange Juice, Status: Bought from Marsh
2. Sony Laptop, Status: Bought from Walmart
3. Bike, Status: Bought from Walmart

Press Enter for Main Menu........

--------------------------------------
Main Menu:
1. Buy an item
2. Return an item
3. Display Warehouse information
4. List of Items bought
5. Exit
--------------------------------------
Select an option: 1

List of warehouses in the town:
1. Marsh, Kinser Pike, Bloomington, In
2. Walmart, 2nd St. Bloomington, IN

Select the warehouse: 2
List of items stocked in the warehouse:
1. Sony Laptop
2. Bike
3. None
Select the item to buy: 2
Enter the quantity: 1

Not enough quantity to fill the order, Sorry!!

Press Enter for Main Menu........

--------------------------------------
Main Menu:
1. Buy an item
2. Return an item
3. Display Warehouse information
4. List of Items bought
5. Exit
--------------------------------------
Select an option: 2

List of items bought until now:
1. Orange Juice, Status: Bought from Marsh
2. Sony Laptop, Status: Bought from Walmart
3. Bike, Status: Bought from Walmart

Select the item to be returned: 3

Enter the quantity to be returned: 1
List of warehouses in the town:
1. Marsh, Kinser Pike, Bloomington, In
2. Walmart, 2nd St. Bloomington, IN

Select the warehouse: 2

Item is returned back successfully

Press Enter for Main Menu........

--------------------------------------
Main Menu:
1. Buy an item
2. Return an item
3. Display Warehouse information
4. List of Items bought
5. Exit
--------------------------------------
Select an option: 1

List of warehouses in the town:
1. Marsh, Kinser Pike, Bloomington, In
2. Walmart, 2nd St. Bloomington, IN

Select the warehouse: 2
List of items stocked in the warehouse:
1. Sony Laptop
2. Bike
3. None
Select the item to buy: 2
Enter the quantity: 1

The order is fulfilled

Press Enter for Main Menu........

--------------------------------------
Main Menu:
1. Buy an item
2. Return an item
3. Display Warehouse information
4. List of Items bought
5. Exit
--------------------------------------
Select an option: 1

List of warehouses in the town:
1. Marsh, Kinser Pike, Bloomington, In
2. Walmart, 2nd St. Bloomington, IN

Select the warehouse: 2
List of items stocked in the warehouse:
1. Sony Laptop
2. Bike
3. None
Select the item to buy: 3
You selected not to buy any item, bad for our business

Press Enter for Main Menu........

--------------------------------------
Main Menu:
1. Buy an item
2. Return an item
3. Display Warehouse information
4. List of Items bought
5. Exit
--------------------------------------
Select an option: 4

List of items bought until now:
1. Orange Juice, Status: Bought from Marsh
2. Sony Laptop, Status: Bought from Walmart
3. Bike, Status: Returned back to Walmart
4. Bike, Status: Bought from Walmart

Press Enter for Main Menu........

--------------------------------------
Main Menu:
1. Buy an item
2. Return an item
3. Display Warehouse information
4. List of Items bought
5. Exit
--------------------------------------
Select an option: 5


mausam

Posts: 243
Nickname: mausam
Registered: Sep, 2003

Re: major HELP needed for program Posted: Sep 16, 2003 9:40 PM
Reply to this message Reply
So where is the problem

Use System.in to read to input from the user
manipluate the date
and then use System.out to show tha data

Flat View: This topic has 1 reply on 1 page
Topic: Background Images Previous Topic   Next Topic Topic: How this is possible?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use