Index
All Classes and Interfaces|All Packages|Constant Field Values
A
- AutomatedTellerMachine - Class in com.vikingcloud.horsetrack
-
Handles the core ATM (Automated Teller Machine) logic, including displaying current state, get horse by number, processing bets, restocking, setting the winner horse, and initializing the list of horses.
- AutomatedTellerMachine() - Constructor for class com.vikingcloud.horsetrack.AutomatedTellerMachine
- AVAILABLE_DENOMINATIONS - Static variable in class com.vikingcloud.horsetrack.constants.DenominationConstants
B
- BetCommand - Class in com.vikingcloud.horsetrack.command
-
Implementation of the Bet Command which allows handling bets for a racehorse with a number and an amount.
- BetCommand(int, int) - Constructor for class com.vikingcloud.horsetrack.command.BetCommand
C
- CashInventory - Class in com.vikingcloud.horsetrack.model
-
Represents the ATM's bill inventory.
- CashInventory() - Constructor for class com.vikingcloud.horsetrack.model.CashInventory
- com.vikingcloud.horsetrack - package com.vikingcloud.horsetrack
- com.vikingcloud.horsetrack.command - package com.vikingcloud.horsetrack.command
- com.vikingcloud.horsetrack.constants - package com.vikingcloud.horsetrack.constants
- com.vikingcloud.horsetrack.model - package com.vikingcloud.horsetrack.model
- com.vikingcloud.horsetrack.parser - package com.vikingcloud.horsetrack.parser
- com.vikingcloud.horsetrack.service - package com.vikingcloud.horsetrack.service
- Command - Interface in com.vikingcloud.horsetrack.command
-
Interface which defines the pattern for all the commands of the system.
- CommandConstants - Class in com.vikingcloud.horsetrack.constants
-
Holds the commands of the system as constants to be reused in the application.
- CommandParser - Class in com.vikingcloud.horsetrack.parser
- createInitialHorseList() - Static method in class com.vikingcloud.horsetrack.service.HorseFactory
D
- DEFAULT_RESTOCK_COUNTS - Static variable in class com.vikingcloud.horsetrack.constants.DenominationConstants
-
This map provies flexibility for the denomination inventory.
- DENOMINATION_1 - Static variable in class com.vikingcloud.horsetrack.constants.DenominationConstants
- DENOMINATION_10 - Static variable in class com.vikingcloud.horsetrack.constants.DenominationConstants
- DENOMINATION_100 - Static variable in class com.vikingcloud.horsetrack.constants.DenominationConstants
- DENOMINATION_20 - Static variable in class com.vikingcloud.horsetrack.constants.DenominationConstants
- DENOMINATION_5 - Static variable in class com.vikingcloud.horsetrack.constants.DenominationConstants
- DenominationConstants - Class in com.vikingcloud.horsetrack.constants
-
Holds constants for the denominations available and the amounts initially available.
- dispenseBills(Map<Integer, Integer>) - Method in class com.vikingcloud.horsetrack.model.CashInventory
- displayInventory() - Method in class com.vikingcloud.horsetrack.model.CashInventory
- displayState() - Method in class com.vikingcloud.horsetrack.AutomatedTellerMachine
E
- execute(AutomatedTellerMachine) - Method in class com.vikingcloud.horsetrack.command.BetCommand
- execute(AutomatedTellerMachine) - Method in interface com.vikingcloud.horsetrack.command.Command
- execute(AutomatedTellerMachine) - Method in class com.vikingcloud.horsetrack.command.InvalidBetCommand
- execute(AutomatedTellerMachine) - Method in class com.vikingcloud.horsetrack.command.InvalidCommand
- execute(AutomatedTellerMachine) - Method in class com.vikingcloud.horsetrack.command.InvalidHorseNumberCommand
- execute(AutomatedTellerMachine) - Method in class com.vikingcloud.horsetrack.command.QuitCommand
- execute(AutomatedTellerMachine) - Method in class com.vikingcloud.horsetrack.command.RestockCommand
- execute(AutomatedTellerMachine) - Method in class com.vikingcloud.horsetrack.command.SetWinnerCommand
G
- getBillsForPayout(int) - Method in class com.vikingcloud.horsetrack.model.CashInventory
- getHorseByNumber(int) - Method in class com.vikingcloud.horsetrack.AutomatedTellerMachine
- getName() - Method in class com.vikingcloud.horsetrack.model.Horse
- getNumber() - Method in class com.vikingcloud.horsetrack.model.Horse
- getOdds() - Method in class com.vikingcloud.horsetrack.model.Horse
H
- Horse - Class in com.vikingcloud.horsetrack.model
-
Represents a racehorse with a number, name, odds, and winner state.
- Horse(int, String, int) - Constructor for class com.vikingcloud.horsetrack.model.Horse
- HorseFactory - Class in com.vikingcloud.horsetrack.service
-
Utility class for creating and initializing the default list of horses for the ATM.
I
- InvalidBetCommand - Class in com.vikingcloud.horsetrack.command
-
Implementation of the Invalid Bet Command which allows handling scenarios where the user attempts to make invalid bets.
- InvalidBetCommand(String) - Constructor for class com.vikingcloud.horsetrack.command.InvalidBetCommand
- InvalidCommand - Class in com.vikingcloud.horsetrack.command
-
Implementation of the Invalid Command which allows handling scenarios where the user attempts to use invalid commands.
- InvalidCommand(String) - Constructor for class com.vikingcloud.horsetrack.command.InvalidCommand
- InvalidHorseNumberCommand - Class in com.vikingcloud.horsetrack.command
-
Implementation of the Invalid Horse Number Command which allows handling scenarios where the user attempts to execute commands on racehorses non-existing in the system.
- InvalidHorseNumberCommand(int) - Constructor for class com.vikingcloud.horsetrack.command.InvalidHorseNumberCommand
- isWinner() - Method in class com.vikingcloud.horsetrack.model.Horse
M
- main(String[]) - Static method in class com.vikingcloud.horsetrack.Main
- Main - Class in com.vikingcloud.horsetrack
-
This is the main class of the application.
P
- parse(String, AutomatedTellerMachine) - Static method in class com.vikingcloud.horsetrack.parser.CommandParser
- processBet(int, int) - Method in class com.vikingcloud.horsetrack.AutomatedTellerMachine
Q
- QUIT - Static variable in class com.vikingcloud.horsetrack.constants.CommandConstants
- QuitCommand - Class in com.vikingcloud.horsetrack.command
-
Implementation of the Quit Command which allows terminating the execution of the application.
- QuitCommand() - Constructor for class com.vikingcloud.horsetrack.command.QuitCommand
R
- restock() - Method in class com.vikingcloud.horsetrack.AutomatedTellerMachine
- restock() - Method in class com.vikingcloud.horsetrack.model.CashInventory
- RESTOCK - Static variable in class com.vikingcloud.horsetrack.constants.CommandConstants
- RestockCommand - Class in com.vikingcloud.horsetrack.command
-
Implementation of the Restock Command which allows the user to restock the cash inventory.
- RestockCommand() - Constructor for class com.vikingcloud.horsetrack.command.RestockCommand
S
- SET_WINNING_HORSE - Static variable in class com.vikingcloud.horsetrack.constants.CommandConstants
- setWinner(boolean) - Method in class com.vikingcloud.horsetrack.model.Horse
- SetWinnerCommand - Class in com.vikingcloud.horsetrack.command
-
Implementation of the Set Winner Command which allows the user to set the winner racehorse.
- SetWinnerCommand(int) - Constructor for class com.vikingcloud.horsetrack.command.SetWinnerCommand
- setWinningHorse(int) - Method in class com.vikingcloud.horsetrack.AutomatedTellerMachine
All Classes and Interfaces|All Packages|Constant Field Values