Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need some help with the enterprise class. It needs to be in java. I've attatched CoffeeShop class, Drink class, and the P2Driver class. CoffeeShop and

Need some help with the enterprise class. It needs to be in java. I've attatched CoffeeShop class, Drink class, and the P2Driver class. CoffeeShop and P2Diver, will be edited based on the enterprise class. Thanks for any help.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Your managerial skills, work ethic, and customer service has turn your Coffee Shop into a thriving business! You are so successful that you can now open new coffee shops in the area and become an Enterprise!! This project will build off of project 1. You will need both The CoffeeShop class The Drink class You can remove the junit test classes if you want. - Create a new Project: Project2 and copy the CoffeeShop and Drink classes and put them in this new project. What you will need: An Enterprise class that has a. A name for your Enterprise (i.e.: This can be funny or serious, real or not An ArrayList of CoffeeShop's. You will need at least 4 CoffeeShops. You can have more if you want. b. The CoffeeShop class a) will need to sort its Drink's by cost. Since the cost of Drink is part of an Object, you will need to swap all the data around during the sort and not just the cost. b) If you plan on all of your CoffeeShop's having the same name, change the name variable to a location (either city or street if in the same city) c) You will need a method to print each of the Drink from a coffee shop that costs more than $5.00 or be able to print a message saying no Drink's at this shop is over $5.00 The Drink class: you will add a toString method (a toString returns a String that represents the state of the object) A P2Driver class that has a class attribute of an Enterprise class (there should not be a variable or instantiation for CoffeeShop or Drink classes). All the data for your classes should be hard coded in the Driver Your program will need to Pass all hard-coded data from the P2Driver to the Enterprise class Print a Welcoming message stating your Enterprise name Print each CoffeeShop and its Drink (all data associated with Drink) be sure to use the new toString method from the Drink class in your print method. Sort the Drink's in each CoffeeShop in ascending order by cost. Print a line stating that the Drink data is now sorted Re-Print each CoffeeShop and its Drink's as well as Calculate and print each CoffeeShop's average Drink cost. - Print the CoffeeShops again but this time only displaying the Drink's with a cost over $5.00 for each CoffeeShop. If a CoffeeShop has no Drink's over $5.00 you should have an appropriate message saying so (Hint: to make sure your program tests all possibilities, there should be at least one CoffeeShop that does not have any Drink with a cost over $5.00) - Print a good-bye message All of the above will require methods in the Enterprise class and a few new methods in the CoffeeShop class. Your managerial skills, work ethic, and customer service has turn your Coffee Shop into a thriving business! You are so successful that you can now open new coffee shops in the area and become an Enterprise!! This project will build off of project 1. You will need both The CoffeeShop class The Drink class You can remove the junit test classes if you want. - Create a new Project: Project2 and copy the CoffeeShop and Drink classes and put them in this new project. What you will need: An Enterprise class that has a. A name for your Enterprise (i.e.: This can be funny or serious, real or not An ArrayList of CoffeeShop's. You will need at least 4 CoffeeShops. You can have more if you want. b. The CoffeeShop class a) will need to sort its Drink's by cost. Since the cost of Drink is part of an Object, you will need to swap all the data around during the sort and not just the cost. b) If you plan on all of your CoffeeShop's having the same name, change the name variable to a location (either city or street if in the same city) c) You will need a method to print each of the Drink from a coffee shop that costs more than $5.00 or be able to print a message saying no Drink's at this shop is over $5.00 The Drink class: you will add a toString method (a toString returns a String that represents the state of the object) A P2Driver class that has a class attribute of an Enterprise class (there should not be a variable or instantiation for CoffeeShop or Drink classes). All the data for your classes should be hard coded in the Driver Your program will need to Pass all hard-coded data from the P2Driver to the Enterprise class Print a Welcoming message stating your Enterprise name Print each CoffeeShop and its Drink (all data associated with Drink) be sure to use the new toString method from the Drink class in your print method. Sort the Drink's in each CoffeeShop in ascending order by cost. Print a line stating that the Drink data is now sorted Re-Print each CoffeeShop and its Drink's as well as Calculate and print each CoffeeShop's average Drink cost. - Print the CoffeeShops again but this time only displaying the Drink's with a cost over $5.00 for each CoffeeShop. If a CoffeeShop has no Drink's over $5.00 you should have an appropriate message saying so (Hint: to make sure your program tests all possibilities, there should be at least one CoffeeShop that does not have any Drink with a cost over $5.00) - Print a good-bye message All of the above will require methods in the Enterprise class and a few new methods in the CoffeeShop class

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

Students also viewed these Databases questions

Question

4. Label problematic uses of language and their remedies

Answered: 1 week ago