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
Harold wants to create a design that would depict the innocent and evil sides of human nature. Which colors can Harold use to de
belka [17]

Answer:

Usually good and evil are depicted as black and white or red and white. White being good, or pure.

Explanation:

8 0
3 years ago
Defensive programming is sometimes referred to as _________.
Romashka [77]
Anti-malware and Anti-Virus
6 0
3 years ago
Is using abbreviations and symbols in social media a problem? Why or why not?
Ugo [173]
The correct answer is..A? 
5 0
3 years ago
1. Write a function that will ask the user to enter a value in dollars. The function should calculate and display the equivalent
julia-pushkina [17]

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

   

    valueInDollars();

}

   public static void valueInDollars() {

       double currentMoney, quarters, dimes, nickels, pennies;

       Scanner input = new Scanner(System.in);

       

       System.out.print("Enter a value in dollars: ");

       currentMoney = input.nextDouble();

       currentMoney *= 100;

       quarters = (int)currentMoney / 25;

       currentMoney = currentMoney % 25;

       

       dimes = (int)currentMoney / 10;

       currentMoney = currentMoney % 10;

       

       nickels = (int)currentMoney / 5;

       currentMoney = currentMoney % 5;

       

       pennies = currentMoney;

       

       System.out.print("Quarters: " + quarters + "\n" + "Dimes: " + dimes + "\n" + "Nickels: " + nickels + "\n" + "Pennies: " + pennies);

   }

}

Explanation:

<u>Inside the function:</u>

- Declare the variables

- Ask the user for a value in dollars

- Multiply that value by 100

- Find the amount of quarters, dimes, nickels, and pennies

- Print the values

<u>Inside the main:</u>

- Call the function

3 0
3 years ago
"assignment is to create a program that will read a value from an array, and then place this value in another array with the loc
White raven [17]

Answer:

#include <iostream>//including libraries

using namespace std;

int main()

{

int arr[6] = { 0,1,2,3,4,5 };//make sure size of arr is 1 less than secArr

int secArr[7];//second array (1 element bigger)

for (int i = 0;i < 6;i++)//looping through each element (6 times)

{

 secArr[i + 1] = arr[i];//transferring elements to second array and shifting by 1 cell

 cout << secArr[i + 1] << endl;//printing elements of second array

}

return 0;//terminating program

}

Explanation:

The array size can range from any number. just make sure to keep arr one less than secArr. This is because we need the room for the extra element. This task is to help you understand how array work and how to parse through them using loops. For loops are the best for this task because even if you think intuitively, they work for as long as there are items in the array. and you can define the size yourself.

5 0
3 years ago
Other questions:
  • What human activity would cause a decrease in the population of another species? (The action of humans would impact one species,
    9·1 answer
  • when you cross or enter traffic from a full stop, how much space should you allow on city streets? on the highway?
    11·1 answer
  • Kyra needs help planning what images and text to use in her web page what technique can help her
    5·2 answers
  • Under the assumption that there exists an unknown Turing machine encodableinc1bits that decides3-SATis inO(n10) time, give imple
    7·1 answer
  • Witch of the following is a valid why a scientist might a scientific theory
    13·1 answer
  • To open a Google Doc in another software application, the user must first download it. True or false?
    12·2 answers
  • Omo help me i need it now.
    12·1 answer
  • Who watches the show gravity falls, if you do, if you play the theme song for the first episode backwards you get a hiding messi
    11·2 answers
  • What does it mean to be a good cyber citizen?
    8·2 answers
  • True or False <br> Hebrew Bible and the Koran were first written in English.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!