Main window with a game menu

Assignment Help Computer Engineering
Reference no: EM13197045

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: EM13197045

Questions Cloud

What price should the monopolist charge for profit : Suppose a monopolist faces a market demand curve given by P=220-3Q. Also, the marginal cost of production is constant and equal to 40. There are not fixed costs. What price should the monopolist charge in order to maximize profit as well as the dea..
Determine by what percent did gdp decline : The Commerce Department said gross domestic product, the broadest measure of goods and services produced in the USA, fell at a 0.3% annual rate in the third quarter. Consumer spending, two-thirds of economic activity, plummeted at a 3.1% rate-the ..
Illustrate the market for theater tickets : illustrate the market for theater tickets in the case of these two externalities. Again, label the demand curve, the social-value curve, the supply curve, the social-cost curve, the market equilibrium level of output, the efficient level of output..
What direction must the pilot fly to make it to toronto : An air ambulance is travelling from Barrie to Toronto. Toronto is located 90 km [S5°E] of Barrie. If the wind is blowing from the South with a velocity of 62 km/h, and the plane's air speed is 375 km/h, what direction must the pilot fly to make it..
Main window with a game menu : 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.
Choose the combined inequality : In Lake Mille Lax, a walleye (type of freshwater fish) must be less than or equal to 20 inches or longer than or equal to 28 inches for the fish to be considered a keeper. Choose the combined inequality that describes this scenario.
What are the length and width of a rectangle traffic sign : what are the length and width of a rectangle traffic sign if the length exceeds the width by 15 inches and the perimeter is 158.
Find the work done w in pulling the bucket : A bucket that weights 4 lb and a rope of negligible weight are used to draw water from a well that is 70 ft deep. The bucket is filled with 36 lb of water and is pulled up at a rate of 2.5 ft/s, but water leaks out of a hole in the bucket at a rat..
Estimate the maximum error : The dimensions of a closed rectangular box are measured as 90 cm, 65 cm, and 34 cm, respectively, with a possible error of 0.2 cm in each dimension. Use differentials to estimate the maximum error in calculating the surface area of the box.

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