Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Give a .cpp file that do the following:

Blake's Cookie Madhouse 
Create a cookie class called Cookie that holds all the cookie fields (name, base, chips, topping, myFourthCookieOptionChoice ). 

Create an empty, a full (set of parameters) and one parameter (name) Cookie constructors. 

Create "set" and "get" member functions that set/get the Base (type string), Chips (type string, type int), Topping (type char), 
myFourthCookieOptionChoice (type yourChoice).

ex: setBase(string) // takes a string argument as an input
string getBase( ) //returns a string.

The setTopping(char) function should use a switch or if/if-else/else statement for a few preset options. 
The getChips() should be two functions getChipsName() and getChipsQuantity() one for each return type. 

Create a displayCookie() member function that displays all the cookie fields.

ex: The Cookie("Chunky Monkey", "Peanut Butter", "Chocolate Chips", 20, 'b', 1 ) might display
Chunky Monkey - a Peanut Butter cookie loaded with over 20 

Chocolate Chips topped with yummy Bananas (Gooey Level 1/5). 

ex: The Cookie("Chocolate Lava", "Mocha", "Chocolate Chips", 50, 'n', 5 ) might display

Chocolate Lava - a Mocha cookie loaded with over 50 
Chocolate Chips (Gooey Level 5/5).

Create a BlakesCookieMadHouse (hw5.cpp) that creates four cookie objects of type Cookie() and display each cookie using the displayCookie() member function. 

First by constructing a default cookie (name only constructor), 

create an emprty default, then change each parameter

a full constructor (all parameters set)

copying a cookie and change half of its values.

Be Creative -ex: create a welcome screen, dress up the cookie descriptions and how they are dispayed 

using member function  

Java, Programming

  • Category:- Java
  • Reference No.:- M994081

Have any Question?


Related Questions in Java

Project requirementsfor the problem described in the next

Project requirements For the problem described in the next section, you must do the following: 1. include your student ID at the end of all filenames for all java code files. Three classes have been identified in section ...

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Assessment instructionsin this assessment you will design

Assessment Instructions In this assessment, you will design and code a simple Java application that defines a class, instantiate the class into a number of objects, and prints out the attributes of these objects in a spe ...

Operating systems assignment -problem 1 sharing the bridgea

Operating Systems Assignment - Problem 1: Sharing the Bridge A new single lane bridge is constructed to connect the North Island of New Zealand to the South Island of New Zealand. Farmers from each island use the bridge ...

Solving 2nd degree equationsbull write the following java

Solving 2nd degree equations • Write the following Java methods • boolean real-sols(double a, double b, double c): it returns true if the 2nd degree equation ax2 + bx + c has real solutions • double solution1(double a, d ...

Assessment instructionsin this assessment you will complete

Assessment Instructions In this assessment, you will complete the programming of two Java class methods in a console application that registers students for courses in a term of study. The application is written using th ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As