Results 1 to 5 of 5
Thread: Hotel Reservation in JAVA (help)
- 07-31-2011, 08:52 PM #1
Member
- Join Date
- Jul 2011
- Posts
- 2
- Rep Power
- 0
Hotel Reservation in JAVA (help)
Hi everyone, teacher gave a HWK however I couldn't understand what I will do exactly, can you help me?
MIS 233 Intermediate Programming
Summer 2011 Homework 4
Deu 02.08.2011
Consider a restaurant selling pizzas. There are many different kinds of pizzas. Each pizza consists of some ingredients. Pizzas types are differentiated in terms of the content of ingredients. Pizzas are served in three different sizes: small, medium and large.
When completing the service process a bill is presented to the user after paying the bill the GUI is ready for getting information from a new service. Pricing is based on the prices of ingredients which depends on the size of the pizza and the amount of paste in each pizza added up a fixed cost as explained later and a profit margin.
The GUI enables the user to make pizza selections for a service. More then one pizza can be selected for a service. Each pizza selection means deciding its size (for sizes use Combo boxes, for ingredients of pizzas, use multiple selection lists. There are fife types of pizzas whose ingredients are fixed (fixed pizzas) (these are shown below) The user can select a fixed pizza type or select custom from another combo box. By selecting custom the user makes her own pizza by selecting ingredients (use a multiple selection list for listing and selecting ingredients) After selecting a product add it to the total items of the service by pressing the add button. When a service is completed bill button is pressed indicating that the bill should be prepared and presented to the user. When paid button is presented anything about the previous service is erased. Then the GUI is ready to take a new service.
The GUI class should have a price method calculating the price of the pizza considering unit prices of the ingredients involved.
In an order, for each new pizza specify size of that pizza. Each service is consists of many orders From the GUI add each order to a list when a service is complete. Size of a pizza is specified which affects the price of a pizza in the order: Price information for ingredients is based on small sizes, for medium size multiplying factor is 1.50 for large sizes this factor is 2.00. That is a large pizza of the same type costs 2.00 times higher then the small size one In a service it is possible to give many such orders. At the end of each service a bill is required calculating the price of the service. Price of a pizza is prices of each ingredients in the pizza added up a fixed price (price of paste) depends on the size of pizza For small sizes fixed price is 10, for medium size pizzas fixed price is 15.0 and for large ones it is 20.0 Display only the prices of each pizza to the customer together with the total billing amount. When a service is completed presenting the bill clear the orders.
The Test class is responsible to create a GUI class that extends form the JFrame class and sets its close operation, size and visibility
Create two Ingredient arrays holding name of ingredient, and price per unit.
Include the following ingredients and their prices for small size pizzas
Names:cheese,tomato, olives, mushroom,salami
Prices:1.00,1.50,1.75.2.50,3,50
The ingredients of the fife fixed pizzas are as follows.
Fixed 1: cheese, tomato
Pixed 2: cheese, olive, salami
Fixed 3: mashroom, samami, olive
Fixed 4: cheese, olive
Fixed 4: mashroom, samami
-
Please ask a specific question. Where precisely are you stuck?
- 07-31-2011, 09:04 PM #3
First thing would be to make some notes and come up with a design.
What does the GUI need to have? List the fields, the choices and the buttons you might want to use.
It would help us help you if you listed your specific questions. This is your homework and you are expected to do it yourself. We can help you with bits and pieces of it, but you are going to have to do most of it.
- 07-31-2011, 09:20 PM #4
Member
- Join Date
- Jul 2011
- Posts
- 2
- Rep Power
- 0
Firstly how many classes do I have to create (I think both of them will be "GUI", "Ingredients")
What will be inside GUI?
What will be inside Ingredients?
In addition, to create buttons, comboboxes is very hard in JAVA, is there any easy way like in C# (drag&drop) (I use Eclipse)
I made 3 HWKs using Console however, when it comes to GUI my brain stoppedLast edited by BattalGazi; 07-31-2011 at 09:24 PM.
- 07-31-2011, 09:32 PM #5when it comes to GUI my brain stopped
Go to this site and Search for Creating a GUI
The Really Big Index
Similar Threads
-
java reservation class plane seat and reservation classes
By cool_guy364 in forum Advanced JavaReplies: 2Last Post: 10-15-2009, 10:56 AM
Bookmarks