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

  Design a pseudocode algorithm

design a pseudocode algorithm you would write for a simple task like making a turkey sandwich, as well as three simple control structures that could be used to create this algorithm. What do you think is the most difficult part of creating the alg..

  What exactly are static and dynamic chains

Do I have although information to do this problem and What exactly are the static and dynamic Chains? I am not a programmer and I am trying to get this right.

  Express wpan, wlan, wan, rfid, and gps

can someone assist me in understanding the following WPAN, WLAN, WAN, RFID, and GPS.

  Create program that will read a list of student last names

create program that will read a list of student last names

  Write down an interactive web page named swap.html

Write an interactive Web page named swap.html that contains two text boxes and a button. When the user clicks the button, the contents of the two text boxes should be swapped.

  Program to compute the area and circumference of circle

Algorithm which will prompt for and receive the measurement of the diameter of a circle and compute and show the area and circumference of the circle.

  Determining the priority of period of execution of irqj

Determining the priority of period of execution of IRQJ

  Define why the above statement is true

Whenever the pointer of a list or a tree is manipulated, the process that performs this operation must be considered to be in a critical section. Please explain why the above statement is true and what the cause of that need is.

  Declaring a variable using the public, friend, or private

In visual basic.NET, what makes up a component? What are the advantages of components? In addition, what are the types of class data and how do you decide which is appropriate? describe the difference between declaring a variable using the keyword..

  What is the object-oriented software

Why is object-oriented paradigm becoming the dominant software engineering choice? Does object-oriented paradigm help to enforce the concept that information is stored in one place and needs to be updated or changed only in that place.

  Express how to use the six steps of the psdlc

Each time you need to play a particular song, you have to manually search through the boxes to find the CD that has the song you need. It has become a habit that as individuals finish playing a CD, they would simply put it in the nearest box.

  Define working with database tables

For this assignment, you would create a Visual Basic.NET application based on the skills and concepts used in IP2. In this exercise, you will create a solution that works with two tables having a Master/Detail relationship.

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