Question
You will write two programs - One in Java, One in C++. Submit the source files for both programs to blackboard. Note while these programs
You will write two programs - One in Java, One in C++. Submit the source files for both programs to blackboard. Note while these programs will be similar c++ programs require destructors, virtual keyword for overriding, header guards, initialization lists among other subtle differences. The program will use inheritance, polymorphism and an interface/ abstract base class is to build some IceCream treats. Yum. Required classes: Topping Member(s): / List (iava) /vector (c++) toppings // sprinkles, hot fudge, nuts.. Methods: addToping (String topping) display() destructor /ladd a topping to your container //display all your toppings for this treat IceCream: //this is your Base/Super class: Members: string flavor, /I note the access modifier here. If we want to access topping from our derived /extended classes, it's not private or oublic but...? Topping topping / c++ version use initialization list Constructor: ( String flavor); //use the Topping member to add a topping Method: addTopping (String topping) //display all attributes of the IceCream //Use the topping display () to show the toppings. Method: display() /java implementation - create an interface iIceCream with the methods in the above IceCream class. IceCream class implements ilceCream interface [/c++ implementation set addTopping() to pure virtual.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started