1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Pavlova-9 [17]
2 years ago
6

Creating an application for an ice cream shop. Create an interface named Flavor. Create three subclasses Lemon, Mint, and Chocol

ate. Create a class named Cone that has a single member variable named scoops of type List with a generic argument of Flavor. Initialize the scoops member variable to an object of one of the two list classes discussed during the lecture. Add a method named add with a single parameter of type Flavor named scoop. This will add the scoop object to the scoops list.
Create a class named IceCreamShop. The class has a single member variable of type Map named orders. Initialize this map to an instance of type HashMap. This map is used to track customer orders. It maps a customer name of type String to an instance of Cone. The map is modified by the following methods:

Add a method orderScoop(String customer, Flavor flavor). This method first checks if thereâs already an order for the given customer in the map. If the map does not have an entry with the customer name, a new entry is put into the map with a new Cone object. If the map already contains an entry, it gets the cone value from the map. Then it adds a new flavor to the cone. Note: Thereâs no need to put the cone back into the map because the map uses a reference to the cone object.

Add a method completeOrder(String customer). This method will return the cone for the given customer and remove the entry from the map.
Computers and Technology
1 answer:
Tpy6a [65]2 years ago
6 0

Answer:

I don't know for sure what the answer is but I hope you can find someone that can give you the answer sorry!

Explanation:

You might be interested in
In PyCharm, write a program that prompts the user for their name and age. Your program should then tell the user the year they w
Neporo4naja [7]

Answer:

def main():

   name = input("What is your name? ")

   if not name == "" or "":

       age = int(input("What is your age? "))

       print("Hello " + name + "! You were born in " + str(2021 - age))

main()

Explanation:

Self explanatory

5 0
3 years ago
Write any two rule of function​
Morgarella [4.7K]

Answer:

Begin to write the function rule by placing b on one side of an equal sign. Step 2 Look at the first row of the table. Think about how the input value and the output value are related. There are two ways to get an output value of 1 when the input value is 2.

Explanation:

Plz Mark me as brainliest

3 0
3 years ago
When federal courts are evaluating digital evidence from computer-generated records, what exception is applied to hearsay?'
Sidana [21]

Answer:

Business-records exception

Explanation:

The Business-records exception which is also known as the Business Entry Rule, this is an exception to the evidentiary rule (which rules out hearsay from a trial) that permits business records to be admitted if the appropriate foundation is laid to show the document is dependable and can be relied upon.

5 0
3 years ago
Assume the availability of a function is_prime. Assume a variable n has been associated with positive integer. Write the stateme
My name is Ann [436]

Answer:

def main():

   # Accept data from the user

   n=int(input('Enter the value of n:'))

   k=2;

   sum=0

   print('The list of the prime numbers are as follows:')

   # This loop runs from k to n

   while k<=n:

       # Call is_prime() method,

       # to check whether k is a prime or not

       sum=sum+is_prime(k)

       k=k+1

   print('Sum of the prime numbers:',sum)

# is_prime() Method

def is_prime(k):

   prime=0        

   i=1

   # Check k is a prime or not

   while i<=int(k):

       # Find the factors of k

       if (k % i) == 0:

           prime=prime+1

       i=i+1

   # If k as two factors

   if(prime==2):        

       print(k)

       return k;

   # If k as more than two factors

   else:        

       return 0;

# Call the main() method

main()

Explanation:

5 0
3 years ago
In which scenario would someone want to use the Paste Link option?
rosijanka [135]
I believe it is A and C! 

Good luck!
3 0
3 years ago
Other questions:
  • kai is interviewing for a job, and the interviewer asks him for an example of skill at cooperating with others. Which example be
    14·2 answers
  • Given numrows and numcols, print a list of all seats in a theater. rows are numbered, columns lettered, as in 1a or 3e. print a
    10·1 answer
  • True or false? Main Content (MC) may include links on the page.
    6·1 answer
  • . Service recovery refers to A. the ability to quickly restore service following a service failure and provide compensation. B.
    5·1 answer
  • Which would you trade on a stock exchange? A: Shares B: Bonds C: Annuities
    6·2 answers
  • What is the advantage of maintaining a list of keywords while creating a design blueprint?
    13·2 answers
  • To combine concepts or ideas into a whole is called
    11·2 answers
  • The question is in the photo
    14·1 answer
  • What is the output from main (below) after the following function is called. void calculateCost(int count, double&amp; subTotal,
    9·1 answer
  • An independent penetration testing company is invited to test a company's legacy banking application developed for Android phone
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!