Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The program should be made using Java Programming Language . Main Form This is the main form for the program. At this form the user

The program should be made using Java Programming Language.

  1. Main Form

This is the main form for the program. At this form the user can select menu from the menu bar, such as Account Menu (Log Out), Games Menu (Buy Games and Owned Games) and Manage Menu (Manage Games and Manage Genre). The menu that will show is determined by the user role. If the user role is Player, then the menus that available are Account Menu and Games Menu only. If the user role is Developer, then the menus that available are Account Menu and Manage Menu.

image text in transcribed

Components:

  • Player Role:
    • JMenu for Menu Account and Menu Games.
    • JMenuItem for Log Out, Buy Games, and Owned Games.
  • Developer Role:
    • JMenu for Menu Account and Menu Manage.
    • JMenuItem for Log Out, Manage Games, and Manage Genre.

Description:

There are some JMenuItem that available (to be clicked):

  • Both Role
    • If user clicks Logout Menu Item, then the program will close Main Form and open Login Form.

  • Player Role

There will be two JMenu displayed:

- Account

image text in transcribed

There are 1 JMenuItem available (to be clicked) in Account Menu (Log Out)

  • If user clicks Logout, program will close Main Form and open Login Form.

- Games

image text in transcribed

- Manage

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Account Games Stim Figure 14. Player Main Form Account Manage Stim Figure 15. Developer Main Form Account Games Log Out Figure 15. Player: Account Menu Account Games Buy Games Owned Games Figure 16. Player: Games Menu There are 2 JMenultem available (to be clicked) in Transaction Menu (Buy Games and Owned Games) o If user click Buy Games, program will close the main form and open Buy Games Form on a new JFrame. o Ifuser click Owned Games, program will close the main form and open Owned Games Form on a new JFrame. Developer Role There will be two JMenu displayed: Account Account Manage Log Out Figure 17. Developer: Account Menu There are 1 JMenultem available (to be clicked) in Account Menu (Log Out) o Ifuser clicks Logout, program will close Main Form and open Login Form. Account Manage Manage Games Manage Genres Figure 18. Developer: Manage Menu There are 2 JMepultem available (to be clicked) in Manage Menu (Manage Games and Manage Genres). o If Developer clicks Manage Games, program will close the main form and open Manage Games Form on a new JFrame o If Developer clicks Manage Genres, program will close the main form and open Manage Genres Form on a new JFrame 4. Buy Games Form This form displays all the currently available game. In this form, users can click any product to see the game detail and Select the quantity they desire. If the user has decided to buy the game, they can press the checkbox to confirm and then buy. Note that the quantity that they buy cannot be 0 or more than the stock available. Game ID Game Price Genre Quantity GAME002 GAME004 GAME005 GAME006 Game Name World of Warcraft Dota 2 ARK: Survival Evolved Valorant 9999 123 149999 1 Mystery Adventure Adventure FPS 1986 1999 Game ID Game Name Game Price Game Genre How many do you want to buy? 0 Once bought game cannot be returned! Back Buy Game Figure 19. Buy Game Form Components: JTable for Game Table. JScrollPane for Game Table Container. JLabel for Gameld, Game Name, Game Price, Game Genre, Game quantity to be bought, and Confirmation Label. JTextField (read-only) for Game ID, Game Name, Game Price, Game Genre. JSpinner for input Quantity. JCheckBox for confirmation JButton for Back and Buy Game. Description: User can only edit quantity field and the other fields can't be edited. If user clicks Buy button, program will validate is there any Games chosen or not. If the game is already chosen, then program will validate the quantity that can't be less than 1 and can't be more than its Game Stock and if the confirm checkbox is checked. Warning Game quantity cannot be less than 0 or more than stock OK Figure 20. Game Quantity Warning Warning A Checkbox must be checked! OK Figure 21. Checkbox Warning If all conditions are fulfilled, then the game will be added to the database (inside Transaction"): If the game hasn't existed yet, insert new game to user's transaction and show game bought message. If the game has existed, update game quantity with the addition of quantity and show game bought message. Success Game Bought OK Figure 22. Game Bought Message After the game is added to user's transaction, decrease Game Stock equals to the quantity. >If user clicks Back button, then Close the Buy Game Form and Open the Main Form. (additional note: every error occurrence will be shown on error message JOption Pane). 5. Owned Games Form Owned Game Form allows user to view all their Games that they have bought and also the total price that they spent to buy all the games. Game ID Genre Quantity Price GAME005 GAMEOD2 GAME006 Game Name ARK: Survival Evolved World of Warcraft Valorant Adventure Mystery FPS 149999 9999 1 Game ID Game Name Game Price Game Genre Owned Quantity Total Spent on Games 169999 Back Figure 23. Owned Games Form Components: JLabel for Selected Game ID, Game Name, Game Price, Game Genre, Owned Quantity and Total spent. JTable for Games Owned Table. JScroll Pane for Game Owned Table container. JTextField (read-only) for Selected Game ID, Game Name, Game Price, Game Genre, Owned Quantity, and total spent on all games. JButton for Back button. Description: When the Owned Page form is opened, calculate the total money spent to buy all the games and display it in the Total spent on all games JTextField. If user clicks one of the Games in the table, it will show all the Game detail and Game Quantity that the user own. X Game ID Genre Quantity Price GAME005 GAMEOO2 GAME006 Game Name ARK: Survival Evolved World of Warcraft Valorant Adventure Mystery EPS 149999 9999 Game ID GAME002 Game Name World of Warcraft Game Price 9999 Game Genre Mystery Owned Quantity Total Spent on Games 169999 Back Figure 24. Game Detail View >If user clicks Back button, then Close the Owned Game Form and Open the Main Form. 6. Manage Game Form Manage Game Form is made for Developers to manage game. Developers can do insert new game, update any existing game data, remove/delete game. Game ID Game Price Genre Quantity 9999 GAMEOO2 GAME004 Game Narne World of Warcraft Dota 2 ARK: Survival Evolved Valorant GAME005 123 149999 Mystery Adventure Adventure FPS 6 986 998 GAME006 Game id New Game Name Game Name New Game Price Game Price New Game Genre Select a Genre Game Genre Select a Genre New Game Quantity 0 Game Quantity Back Delete Update Insert Figure 25. Manage Game Form Components: Jabel for Gameln, Game Name, Game Price, Game Genre, Game Quantity, New Game Name, New Game Price, New Game Genre, New Game Quantity. JTable for Game Table. JScrollPane for Game Table container. JTextField for Gamell (read-only), Game Name, Game Price, New Game Name, New Game Price. JComboBox for choose Game Genre and New Game Genre. JSpinner, for input Game Quantity and New Game Quantity. JButton for Update Game, Delete Game, Insert Game, and Back. Description: All the fields can be edited except for Game ID. Admin can do Insert, Update, Delete Game from database. If admin wants to update or delete, make sure they have selected a Game and fill the JTextFields with the Game Details. Game ID Game Price Genre Quantity GAME002 GAME004 GAME005 GAME006 Game Name World of Warcraft Dota 2 ARK: Survival Evolved Valorant 9999 123 149999 Mystery Adventure Adventure FPS 5 17 1986 998 Game id GAME006 New Game Name Game Name Valorant New Game Price Game Price 11 New Game Genre Select a Genre Game Genre FPS New Game Quantity 0- Game Quantity 998 Back Delete Insert Update Figure 26. Select Game View If the admin presses the Update Button, then validate: Game is selected (by clicking a row in game table). Warning Select a game first! OK Figure 27. Unselected Game Warning Game Name must consist of 5 - 35 characters. Warning Name must be between 5 - 30 Characters! OK Figure 28. Game Name Length Warning Game name must not duplicate. Warning Game name already exists OK Figure 29. Game Name Duplicate Warning Price must be Numeric. Warning Price must be numeric OK Figure 30. Game Price not numeric Warning Price must be more than 0. Warning A Price must be > 0 OK Figure 31. Game Price less than 0 Warning 1 Game Quantity must be more than 0. Warning A Quantity must be > 0 OK Figure 32. Game Quantity less than 0 Warning If all conditions for Update Game are fulfilled, then program will update the game's data in database, and show a message. Success A Update Success OK Figure 33. Update Game Success Message . View before game is updated. Game ID Game Price Genre Quantity Game Name World of Warcraft Dota 2 ARK: Survival Evolved Valorant GAME002 GAME004 GAME005 GAME006 9999 123 Mystery Adventure Adventure FPS 15 17 1986 998 149999 Game id GAME006 New Game Name Game Name Valorant New Game Price Game Price 11 New Game Genre Select a Genre Game Genre FPS New Game Quantity 0- Game Quantity 998 - Back Delete Update Insert Figure 34. Before Game is Updated View View after game is updated. Game ID Game Price Genre Quantity GAME002 GAMF004 GAME005 GAME006 Game Name World of Warcraft Dota 2 ARK: Survival Evolved Valorant 9999 123 149999 10000 Mystery Adventure Adventure FPS 5 7 986 1998 Success Update Success OK Game id GAME006 Game Name Valorant New Game Name New Game Price Game Price 10000 New Game Genre Select a Genre Game Genre FPS New Game Quantity Game Quantity 998 - Back Delete Insert Update Figure 35. After Game is Updated View If Developer clicks Delete button, then validate: Game is selected (by clicking a row in game table). Warning Select a game first! OK Figure 36. Game not selected warning If all conditions for Delete Game are fulfilled, then program delete Game from database and show a message. Success Delete Success OK Figure 37. Delete Game Success Message View before game is deleted. X Game ID Game Price Genre Quantity Game Name World of Warcraft Dota 2 ARK: Survival Evolved Valorant GAME002 GAME004 GAME005 GAME006 9999 123 149999 Mystery Adventure Adventure FPS 1986 998 Game id GAMEOOB New Game Name Game Name Valorant New Game Price Game Price New Game Genre Select a Genre Game Genre FPS New Game Quantity 0 Game Quantity 998 Back Delete Update Insert Figure 38. Before Game Deleted View View after game is deleted. Game ID Game Price Genre Quantity GAMECO2 GAME004 GAME005 Game Name World of Warcraft Dota 2 ARK: Survival Evolved 9999 123 149999 Mystery Adventure Adventure 1986 Success X Delete Success OK Game id TGAMEC06 New Game Name Game Name Valorant New Game Price Game Price New Game Genre Select a Genre Game Genre FPS New Game Quantity Game Quantity 998 - Back Delete Update Insert Figure 39. After Game Deleted View If admin clicks Insert button, then validate: New Game Name must consist of 5 - 30 characters. New Game Name must not be duplicate. New Game Price must be numeric. New Game Price must be bigger than 0. New Game Genre must be selected. New Game Quantity must be more than 0. If all conditions for Insert are fulfilled, then program will Generate a new Gameld GAMEXXX Where X: Digit (0-9) Example: GAME001, GAME002 GAME010, GAME120 After creating the Gameld, then the program will insert new Game to database and show message. Success A Insert Success OK Figure 40. Game Insert Success Message View before game is inserted. X Game ID Game Price Genre Quantity GAMEOOZ GAME004 GAME005 GAME006 Game Name World of Warcraft Dota 2 ARK: Survival Evolved Valorant 9999 123 149999 10000 Mystery Adventure Adventure FPS 5 7 986 998 CS:GO Game id Game Name New Game Name New Game Price 1149999 Game Price New Game Genre FPS Game Genre Select a Genre New Game Quantity 10 Game Quantity Back Delete Update Insert Figure 41. Before Game Inserted View View after game is inserted. Game ID Game Price Genre Quantity GAMEOD2 GAME004 GAME005 GAMEOD6 GAME007 Game Name World of Warcraft Dota 2 ARK: Survival Evolved Valorant CS:GO 9999 123 149999 10000 149999 Mystery Adventure Adventure FPS FPS 5 7 986 1998 10 Success Insert Success OK Game id CS.GO 149999 Game Name Game Price New Game Name New Game Price New Game Genre New Game Quantity FPS Game Genre Select a Genre 10 Game Quantity Back Delete Update Insert Figure 42. After Game Inserted View >If user clicks Back button, then Close the Manage Game Form and Open the Main Form. (additional note: every error occurrence will be shown on error message JOption Pane). 7. Manage Genre Form Manage Genre Form allows Developers to Insert, update, and Delete Genres. Genre ID Genre Name GEN003 GEN006 GEN007 Adventure Mystery FPS Genre ID New Genre Name : Genre Name Insert Back Delete Update Figure 43. Manage Genre Form View Components: JLabel for Genren. GenreName, New Genre Name. JTextField for Genreld(read-only), input Genre Name and New Genre Name. JButton for Insert, Update, Delete, and Back. Description: If admin wants to update or delete, make sure they have selected a Genre and fill the JTextFields with the Genre Details. Genre ID Genre Name GEN003 GEN006 GEN007 Adventure Mystery Genre ID GENOO7 New Genre Name : Genre Name FPS Insert Back Delete Update Figure 44. Select Genre View If user clicks Update Genre button, program will validate: Genre Name must not be a duplicate, if it has a duplicate show a message. Warning Genre already exists! OK Figure 45. Duplicate Genre Name Warning > Genre Name must be more than 0 characters, if not display a warning message. Warning Please enter a name! OK Figure 46. Empty Genre Name Warning If all conditions for Update Genre are fulfilled, program will update Genre data in database and display a message. Success Update success OK Figure 47. Update Genre Success Message View before genre is updated. Genre ID Genre Name GEN003 GENO06 GEN007 Adventure Mystery FPS Genre ID GENOO7 New Genre Name : Genre Name FPS Insert Back Delete Update Figure 48. Before Genre Updated View . View after genre is updated. Genre ID Genre Name GEN003 GEN006 GEN007 Adventure Mystery First Person Shooter Success X Update success OK Genre ID GENOO7 New Genre Name : Genre Name First Person Shooter Insert Back Delete Update Figure 49. After Genre Updated View If Developer clicks Delete button, then validate: Genre is selected (by clicking a row in genre table), if not then display a warning message. Warning Please Select a Genre OK Figure 50. Genre not selected Warning If all conditions for Delete Genre are fulfilled, then program delete Genre from database and show a message. Success Delete Success OK Figure 51. Genre Deleted Success Message View before genre is Deleted. Genre ID Genre Name GEN003 GEN006 Adventure Mystery First Person Shooter GENOO7 Genre ID GEN006 New Genre Name : Genre Name Mystery Insert Back Delete Update Figure 52. Before Genre Deleted View View after genre is deleted. Genre ID Genre Name GEN003 GENOO7 Adventure First Person Shooter Success Delete success OK Genre ID GEN008 New Genre Name : Genre Name Mystery Insert Back Delete Update Figure 53. After Genre Deleted View If Developer clicks Insert button, then validate: New Genre Name must consist of more than 0 character. New Game Name must not be duplicate. If all conditions for Insert are fulfilled, then program will Generate a new GenrelD. 1 . GENXXX Where X: Digit (0-9) Example: GEN001, GEN002 GEN010, GEN120 After creating the Genreld, then the program will insert new Genre to database and show message. Success Insert Success OK Figure 54. Game Success Insert Message . View before new genre is inserted. Genre ID Genre Name GENOO3 GEN007 Adventure First Person Shooter Genre ID New Genre Name : Horror Genre Name Insert Back Delete Update Figure 55. Before New Genre Inserted View . View after new genre is inserted. Genre ID Genre Name GEN003 GENOOT GEN008 Adventure First Person Shooter Horror Success x Insert success OK Genre ID New Genre Name: Horror Genre Name Insert Back Delete Update Figure 56. After New Genre Inserted View >If user clicks Back button, then Close the Manage Genre Form and Open the Main Form. (additional note: every error occurrence will be shown on error message JOptionPane)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Infrastructure For Medical Research In Databases

Authors: Thomas Heinis ,Anastasia Ailamaki

1st Edition

1680833480, 978-1680833485

More Books

Students also viewed these Databases questions

Question

Locate the centroid x of the area. h y a y=hx b = (h)(x-b) X

Answered: 1 week ago