Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Case Studies In Business Data Bases

Authors: James Bradley

1st Edition

0030141346, 978-0030141348

More Books

Students also viewed these Databases questions