subject

Create a class coffee with data members listed below.

roasttype, which is string representing whether your coffee is light, medium, or dark roast (initialize to an empty string)
temp, which is a floating point value representing the temperature of your coffee in fahrenheit (initialize to 180.0)
include the following member functions:
default constructor,
a constructor with parameters for each data member (in the order given above),
getters and setter methods for each data member named in camel-case. for example, if a class had a data member named mydata, the class would require methods named in camel-case: getmydataand setmydata.
string drinkability(): the function should return how "drinkable" the coffee is based on the temperature. (too cold: < 100.0, just right: > = 100.0 & < 160.0, hot: > = 160.0 & < 180.0, too hot: > = 180.0).

you only need to write the class definition and any code that is required for that class.

note: you must not use the implicit "private" for class data types and methods. include public or private explicitly.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:50
Assume that you have an sorted array of records. assume that the length of the array (n) is known. give two different methods to search for a specific value in this array. you can use english or pseudo-code for your algorithm. what is the time complexity for each algorithm and why?
Answers: 1
question
Computers and Technology, 23.06.2019 11:30
Auser is given read permission to a file stored on an ntfs-formatted volume. the file is then copied to a folder on the same ntfs-formatted volume where the user has been given full control permission for that folder. when the user logs on to the computer holding the file and accesses its new location via a drive letter, what is the user's effective permission to the file? a. read b. full control c. no access d. modify e. none of the above
Answers: 1
question
Computers and Technology, 23.06.2019 12:10
2. fabulously fit offers memberships for$35 per month plus a $50 enrollmentfee. the fitness studio offersmemberships for $40 per month plus a$35 enrollment fee. in how many monthswill the fitness clubs cost the same? what will the cost be?
Answers: 1
question
Computers and Technology, 24.06.2019 08:30
Aconsumer would pay an extra they used the rent to own program to buy the computer, rather than using cash. for all of the items, is the cheapest option over the life of the contract. the most expensive overall option is to use purchase the item.
Answers: 2
You know the right answer?
Create a class coffee with data members listed below.

roasttype, which is string represe...
Questions