Question: Create the boba tea class: a . BobaTea has the following features i . A non - static string called name ii . A non

Create the boba tea class:
a. BobaTea has the following features
i. A non-static string called name
ii. A non-static double called price
iii. A two parameter consturctor with a string and double parameter. The constructor sets name to the string and price to the double parameter
b. In the main, create 3 BobaTea objects with the following values for (name,price):
i. "Milk Tea", 4.99
ii. "Thai Tea", 5.99
iii. "Earl Grey", 3.99
c. Add the 3 objects into a BobaTea array called "order"
d. Display the sum of all prices of the BobaTea objects in order

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!