Review - Icecream Class ● . . . . ● Declare a class called Icecream Add a default constructor Add the following fields - flavor, scoopCount, isCone Add a method called setScoop Count that takes in a number for how many scoops and assigns it the scoopCount field. This method does not need to return anything. ● . Add a method called setFlavor that takes the name of an ice cream flavor and assigns it the flavor field. This method does not need to return anything. ● Add a method called isCone that takes in a true or false value of whether or not the ice cream is on a cone or not. This method does not need to return anything. Add a method called getScoopCount that doesn't take in any values and returns the value of the scoop Count field Add a method called getFlavor that doesn't take in any values and returns the value of the flavor field Add a method called isCone that doesn't take in any values and returns the value of the isCone field Add a method call addScoop that doesn't take in any values and add one more scoop to the icecream and returns the new value of the scoopCount field Add a method called details that doesn't take in or return any values and prints out the details of the ice cream (flavor, number of scoops, whether it's a cone or not)

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 8PE
icon
Related questions
Question
100%
Review - Icecream Class
•
D
•
.
Declare a class called Icecream
Add a default constructor
Add the following fields - flavor, scoopCount, isCone
Add a method called setScoopCount that takes in a number for how many scoops and assigns it the
scoopCount field. This method does not need to return anything.
Add a method called setFlavor that takes the name of an ice cream flavor and assigns it the flavor field. This
method does not need to return anything.
Add a method called isCone that takes in a true or false value of whether or not the ice cream is on a cone or
not. This method does not need to return anything.
Add a method called getScoopCount that doesn't take in any values and returns the value of the scoopCount
field
• Add a method called getFlavor that doesn't take in any values and returns the value of the flavor field
Add a method called isCone that doesn't take in any values and returns the value of the isCone field
Add a method call addScoop that doesn't take in any values and add one more scoop to the icecream and
returns the new value of the scoopCount field
• Add a method called details that doesn't take in or return any values and prints out the details of the ice
cream (flavor, number of scoops, whether it's a cone or not)
Transcribed Image Text:Review - Icecream Class • D • . Declare a class called Icecream Add a default constructor Add the following fields - flavor, scoopCount, isCone Add a method called setScoopCount that takes in a number for how many scoops and assigns it the scoopCount field. This method does not need to return anything. Add a method called setFlavor that takes the name of an ice cream flavor and assigns it the flavor field. This method does not need to return anything. Add a method called isCone that takes in a true or false value of whether or not the ice cream is on a cone or not. This method does not need to return anything. Add a method called getScoopCount that doesn't take in any values and returns the value of the scoopCount field • Add a method called getFlavor that doesn't take in any values and returns the value of the flavor field Add a method called isCone that doesn't take in any values and returns the value of the isCone field Add a method call addScoop that doesn't take in any values and add one more scoop to the icecream and returns the new value of the scoopCount field • Add a method called details that doesn't take in or return any values and prints out the details of the ice cream (flavor, number of scoops, whether it's a cone or not)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,