Beginning with your code add a jmenubar to your main window

Assignment Help Computer Engineering
Reference no: EM13380754

Beginning with your code add a JMenubar to your main window with a Game menu which contains 5 JRadioButtonMenuItems as "Game 1", "Game 2", "Game 3", "Game 4" and "All 4 Games". Here is what your interface may look like (note that the Game menu has been selected so you can see what it has inside it):

You will need to adjust your Seat class to show its availability for exactly 4 games. Each seat may be purchased for up to 4 games/events. Add, to the Seat class, a boolean array attribute called sold that keeps track of whether or not the seat has been sold for each of the exactly 4 games/events (i.e., the array will be of size 4). By default, a seat should not be sold for any of the 4 games. Therefore, when you start the application, the stadium should have all seats available for all 4 games.

772_Main window with a Game menu.png

Adjust your code so that when the Purchase button is pressed on the main application window, then the seats that are currently selected become sold and so they are no longer available for that particular game. Make sure that the following behavior is working:

1. purchased (i.e., unavailable) seats appear as white squares.

2. seats are purchased ONLY for the particular game that is selected in the menu.

3. if "All 4 Games" is selected from the menu, then the seats should be purchased for all 4 games and hence become unavailable for all 4 games.

4. If "All 4 Games" is selected, then the price for each seat currently selected should be multiplied by 4 and a 10% discount (before taxes) should be applied.

5. if "All 4 Games" is selected from the menu, then only seats that are available (i.e., not sold) for ALL of the 4 games should be able to be selected and purchased. So if a seat has been sold even for just one game, then it should appear white when "All 4 Games" is selected from the menu.

6. whenever any game is selected from the menu, all currently selected seats should become unselected.

7. The Purchase button should be disabled if no seats are selected and enabled otherwise.

Change your code so that when the purchase button is pressed, a dialog box appears to allow the user to enter purchasing information and to confirm the purchase. If the purchase is indeed made, then the availability of the seats changes (as you already wrote). However, if the user cancels the purchase, then no change to the seating availability should be made.

Attachment:- Assignment.rar

Reference no: EM13380754

Questions Cloud

Problem 1on 1 january johnson set up valleyviewplaygyms : problem 1on 1 january johnson set up valleyviewplaygyms company tomanufacture and sell childrens outdoor playgyms. he
Poblem : problem 1nbspnbspnbspnbspnbspnbspnbspnbspnbspnbspnbspnbspnbspnbspnbspnbspnbsp nbspnbsp the trial balance of abc ltd at
Essay topicsyou will choose one of the following topics : essay topicsyou will choose one of the following topics which are designed to enhance your understanding of african
The company has collected data concerning weekly fuel : the company has collected data concerning weekly fuel consumptiony average hourly temperaturex1 and the chill indexx2.
Beginning with your code add a jmenubar to your main window : beginning with your code add a jmenubar to your main window with a game menu which contains 5 jradiobuttonmenuitems as
Relationship to learning outcomes critically analyse the : relationship to learning outcomes critically analyse the theory concepts and models of operations and information
Problem 1portfolio expected returnnbsp you own a portfolio : problem 1portfolio expected return.nbsp you own a portfolio that has 1500 invested in stock a and 2600 invested in
Problem 1calculating returnsnbsp suppose a stock had an : problem 1calculating returns.nbsp suppose a stock had an initial price of 83 per share paid a dividend of 1.40 per
A united states company x has contracted to provide a : a united states company x has contracted to provide a service to a european company z european company uses the euro

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd