Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java coding You are going to design a program for the patisserie According to the class diagram, implement Cako class In the default constructor of

image text in transcribed
image text in transcribed
java coding
You are going to design a program for the patisserie According to the class diagram, implement Cako class In the default constructor of the Cake class, you need to initialize the attributes. You are froe for the values In the displayCakeInformation function you will use the following format for the returned valus --name (type). Sprice, amount cakes Info: ingredients Assume that there is an Cake object whose name chocols, type is birthday cako, price is $80, amount is 2 ingredients are ogs, fout, sugar, milk, chocolate When you call displayCakoinformation function with using this object, the following Sering value will be returned. Chocolis (birthday cake). $80, 2 cakes Info: egg, flour, sugar, milk, chocolate After implementing Cake class, add main function to the same class. In the main function, create an ArrayList that stores 3 Cako objects. Create the first object with the default constructor. The information for the other objects will be taken by the user Al the end of the program, please show all cakes whose price is bigger than 350 and amount is smaller than 3 in the ArrayList. Cake name: String type: String price: double amount: int ingredients: String Cake 0 1 - + + + + Cake name: String type: String price: double amount: int ingredients: String Cake () Cake (name: String, type: String, price: double) getName(): String getType(): String getPrice(): double getAmount(): int getlngredients(): String setName(String name): void setType(String type): void setPrice(double price): void setAmount(int amount): void setIngredients(String ingredients): void displayCakeInformation(): String + + + + + + + + +

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

More Books

Students also viewed these Databases questions

Question

=+3. Are the various levels of performance well articulated?

Answered: 1 week ago