Results 1 to 5 of 5
  1. #1
    BattalGazi is offline Member
    Join Date
    Jul 2011
    Posts
    2
    Rep Power
    0

    Default 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

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

  3. #3
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,518
    Rep Power
    25

    Default

    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.

  4. #4
    BattalGazi is offline Member
    Join Date
    Jul 2011
    Posts
    2
    Rep Power
    0

    Default

    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 stopped
    Last edited by BattalGazi; 07-31-2011 at 08:24 PM.

  5. #5
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,518
    Rep Power
    25

    Default

    when it comes to GUI my brain stopped
    Have you looked at the Java tutorial on building GUIs?
    Go to this site and Search for Creating a GUI
    The Really Big Index

Similar Threads

  1. java reservation class plane seat and reservation classes
    By cool_guy364 in forum Advanced Java
    Replies: 2
    Last Post: 10-15-2009, 09:56 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
  •