Class DummyData
This class provides methods to create lists of dummy bets and customers, as well as to randomly populate customers with bets. The generated data can be used for testing or simulating a betting application.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<BasketballBet> Generates a list of dummy basketball bets with game details and associated odds.Generates a list of dummy customers with various customer types.static List<FootballBet> Generates a list of dummy football bets with game details and associated odds.static voidpopulateCustomersWithRandomBets(List<Customer> customers, List<Bet> bets) Populates random customers with random bets from the provided list of bets.
-
Field Details
-
random
ARandominstance used to generate random numbers for various purposes, such as selecting random customers, bets, stakes, and choices.This field is used throughout the class to simulate random betting scenarios, ensuring variability in generated data for each run of the program.
-
-
Constructor Details
-
DummyData
public DummyData()
-
-
Method Details
-
generateDummyFootballBets
Generates a list of dummy football bets with game details and associated odds.This method creates a predefined list of football bets, where each bet contains the names of the teams playing and the associated odds. These dummy data are used for simulating betting data.
- Returns:
- A list of
FootballBetobjects, each representing a football game and its odds.
-
generateDummyBasketballBets
Generates a list of dummy basketball bets with game details and associated odds.This method creates a predefined list of basketball bets, where each bet contains the names of the teams playing and the associated odds. These dummy data are used for simulating betting data.
- Returns:
- A list of
BasketballBetobjects, each representing a basketball game and its odds.
-
generateDummyCustomers
Generates a list of dummy customers with various customer types.This method creates a predefined list of customers, including basic, gold, and platinum types. Each customer has a name and is assigned a specific type, which determines attributes like maximum betting limits. These dummy data are used for simulating customer data in the betting application.
- Returns:
- A list of
Customerobjects, representing customers with varying types and associated properties.
-
populateCustomersWithRandomBets
Populates random customers with random bets from the provided list of bets.This method generates a random number of customer bets by associating selected bets with randomly chosen customers. Each generated bet is assigned a random stake within the customer's allowed maximum, and a random choice is selected from the available choices corresponding to the bet type (football or basketball).
The generated bets are then added to the respective customer objects' list of bets, allowing each customer to have a record of their placed bets.
-