The Cake Bakery Project is a Java-based application designed to manage a bakery system for creating and handling different types of cakes. It provides functionalities to create cakes with various flavors, fillings, and buttercream types.
The project is structured into several classes, each representing a specific aspect of the cake bakery system. Here's a brief overview of the main components:
The Cake
class represents a basic cake entity. It contains attributes such as flavor, size, and filling. Each cake object can have a specific type of filling, represented by the Filling
class, and a type of buttercream, represented by the ButterCream
class.
The VictoriaCake
class is a subclass of Cake
specifically designed for Victoria sponge cakes. It extends the functionality of the Cake
class to include additional attributes such as whether the cake contains berries.
The Filling
class represents the filling inside the cake. It contains attributes such as color and amount.
The ButterCream
class represents the buttercream frosting on the cake. It contains attributes such as type, color, and quantity.
The HOMEWORK7
class serves as the entry point for the application. It demonstrates the usage of arrays and ArrayLists to manage collections of cakes. It instantiates cake objects with different characteristics and prints out their details.
- Create cakes with different flavors, sizes, fillings, and buttercream types.
- Manage collections of cakes using arrays and ArrayLists.
- Demonstrate inheritance and polymorphism with the
Cake
andVictoriaCake
classes.
- Object-oriented programming (OOP)
- Arrays and ArrayLists
- Class and object instantiation
- Inheritance and polymorphism
- Encapsulation
- Method invocation and parameter passing
- Java
To run the Cake Bakery Project:
- Clone the repository to your local machine.
- Open the project in your preferred Java development environment.
- Compile and run the
HOMEWORK7
class to execute the application.
Contributions to the Cake Bakery Project are welcome! If you have any ideas for improvements or new features, feel free to open an issue or submit a pull request.