Menu

[Solved]Java Project Date Night Arcade Overview Tonight Date Night Arcade Great Evening Playing Ga Q37143421

Java Project: Date Night at the Arcade

Overview

Tonight, is date night at the arcade. After great evening ofplaying games and winning prizes, you and your date can’t helpwondering “How are these machines programmed?”. You discusspossible designs on the subway back to campus. You enjoy the restof the night romantically programming your ideas together.

You’ve made several observations about the arcade. A terminal isused to convert money into game credits. Credits are loaded ontoplastic game cards. This data is stored in a card’s magnetic strip.Cards may be swiped at any arcade game through the game’s magneticcard reader. Games subtract credits from a card, but awardstickets. Tickets are also stored on a card’s magnetic strip.Tickets may be exchanged for prizes at the terminal. The terminalis also used to check a card’s credit balance and ticket count, andto transfer credits or tickets between cards.

Tasks

Write a Java program that models the properties, behaviors, andinteractions of objects at the arcade. You’ll also need a testclass that contains a main method. Use the main method to modelactions that would drive the program such as object instantiationsand card swipes. All fields must be private. Provide getter and anynecessary setter methods.

Cards

The magnetic strip on game cards offers limited storage spaceand zero computing power. Cards store information about theircurrent credit balance, ticket balance, and card number. Neitherbalance should ever be negative. Individual cards are incapable ofperforming calculations, including simple addition, or realizingthat their balances could go negative. Every card is created with aunique integer identification number. Although each individual cardis incapable of simple addition, it’s still possible to performcalculations with properties that belong to all cards.

Games

Games require a certain number of credits to be played. Eachgame is equipped with a magnetic card reader and LCD display.Swiping a card reduces its credit balance, but awards a random,non-negative number of tickets. Print the card number, number oftickets won, along with the new total. Print a message if a cardhas insufficient credits to play a game.

The “Win Random Tickets Game!” is actually a terrible game.You’re welcome to create something more complex, but it’s notnecessary for this assignment.

Prize Categories

Each prize category has a name, number of tickets required toearn that prize, and a count of how many items of this categoryremain in a terminal. Prizes know nothing about the terminal theybelong to.

Terminals

Each terminal contains a magnetic card reader. A terminalaccepts money which is converted to credits on a card. Money isaccepted as whole numbers. Credits are awarded at a rate of 2credits for every $1. Players may use a Terminal to check theircard’s balances. Include the card’s number in this printout. All orjust a portion of credits or tickets may be transferred betweencards. Always print a card’s balances when either credits ortickets are accessed through a terminal. Finally, tickets may beexchanged at terminals for prizes. Print an error message if a cardhas insufficient tickets or if the terminal is out of a particularprize type. Print when a prize is awarded and the remaining numberof that prize type in the terminal. A terminal offers 3 categoriesof prizes.

Main Method

Instantiate 2 cards and whatever other objects might benecessary to test your program.

• Load credits onto each card.

• Play a bunch of game using both cards.

• Transfer the balance of credits and tickets from Card 1 toCard 2.

• Request prizes using Card 2.

• Try to play a game and request a prize using Card 1.

• Perform whatever other actions might be necessary to test yourprogram.

Expert Answer


Answer to Java Project: Date Night at the Arcade Overview Tonight, is date night at the arcade. After great evening of playing gam… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *