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

  Finding domain name available to company

Use the Internet resources in order to determine which domain name is available to company. Judge if you would use a .com, .org, or .net for the Web address.

  Testing the program

You are a member of SQA group at Ye Olde Fashioned Software. You propose to your manager that inspections be introduced.

  The organization requires a domain name

find out what domain name is available for the company. Judge whether you would use a .com, .org, or .net for the Web address.The organization requires a domain name

  Information security

What skills are required by personnel working in the information security? State some job titles in field and come up with some required qualifications and some desirable qualifications.

  Find out another design pattern for web based development

There are other design patterns that could be directly applicable to PHP programming, or web programming in general.

  Define the benefits of network segmentation

describe each mechanism's approach for connections establishment and termination.define the benefits of network segmentation.

  Find expectations that his business will continue to grow

Fernando Culebra has always been fascinated by skateboards. Fernando has won many contests, both locally and nationally. His interest in skateboards led him to open Fernando's Skate Shop in Denton, Maine.

  Note down an applet that simulates a soft drink machine

Write down an applet that simulates a soft drink machine. The simulated machine dispenses the following soft drinks: cola, lemon-lime soda, grape soda, root beer, and bottled water. These drinks cost $0.75 each to purchase.

  Suppose that even parity is used for rows

many techniques (typically referred to as forward error correction) can be used to add redundant bits to a message in order to help a receiver right bits that have been damaged in transmission.

  Write down a c++ program that first reads an integer

create a C++ program that first reads an integer for the array size, then reads numbers into an array, computes their average and finds out how many numbers are above the average.

  Software driver that will implement a byte-wide data

Design the hardware and software driver that will implement a byte-wide data transfer from your processor to a peripheral device. Each transfer must be accompanied by a strobe to deskew the data. Draw the UML sequence diagram and the timing diagra..

  Explain respect to parsing efficiency

Compare the performance of LZ77, LZ78 and LZW with respect to parsing efficiency, dictionary generation, coding efficiency

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