lab08 : Inheritance and Polymorphism

num ready? description assigned due
lab08 true Inheritance and Polymorphism Mon 11/26 08:00AM Sun 12/02 11:59PM

Goals

Step by Step

Step 0: Getting Started

This lab may be done solo, or in pairs.

Before you begin working on the lab, please decide if you will work solo or with a partner.

As stated in previous labs, there are a few requirements you must follow if you decide to work with a partner. I will re-iterate them here:

Once you and your partner are in agreement, choose an initial driver and navigator, and have the driver log into their account.

Step 1: Get the lab08 starter code into your repository directory

In this step, we are going to copy the lab08 starter files from the instructor’s directory into your /cs32/lab08 directory.

The files are in the instructors directory at

~richert/public_html/cs32/misc/lab08/*

and also accessible via the URL

http://cs.ucsb.edu/~richert/cs32/misc/lab08/

You want to copy these files into your ~/cs32/lab08 directory.

Step 2: Understanding the starter code and inheritance hierarchy

The purpose of this lab is to write classes and subclasses representing an ice cream item orders that can be sold in an ice cream shop. There are many ways ice cream can be sold, and we will implement a specific way according to the description below:

CustomItem inherits from IceCreamItem

PreMadeItem inherits from IceCreamItem

Step 3: Implement the files to pass your tests.

An example of a CustomItem that is a large size, contains one addition of an “oreo” topping, 2 additions of “peanut” topping, and a price of $7.70.

Custom Size: large
Toppings:
oreos: 1 oz
peanuts: 2 oz
Price: $7.70

An example of a PreMadeItem that is a medium size, the item name is “Banana Slamma”, and has a price of $6.00.

Pre-made Size: medium
Pre-made Item: Banana Slamma
Price: $6.00

Step 4: Testing

The following executables will be generated by typing make all:

You can test each executable separately by executing each individual binary file or you can run all tests by typing make tests.

Step 5: Submitting via Gradescope

You will turn in IceCreamItem.cpp, CustomItem.h, CustomItem.cpp, PreMadeItem.h, and PreMadeItem.cpp for this lab.

The lab assignment “Lab08” should appear in your Gradescope dashboard in CMPSC 32. If you haven’t submitted anything for this assignment yet, Gradescope will prompt you to upload your files.

For this lab, you will need to upload your modified files (i.e. IceCreamItem.cpp, CustomItem.h, CustomItem.cpp, PreMadeItem.h, and PreMadeItem.cpp). You either can navigate to your file, “drag-and-drop” them into the “Submit Programming Assignment” window, or even use a GitHub repo to submit your work.

If you already submitted something on Gradescope, it will take you to their “Autograder Results” page. There is a “Resubmit” button on the bottom right that will allow you to update the files for your submission.

For this lab, if everything is correct, you’ll see a successful submission passing all of the autograder tests.

Remember to add your partner to Groups Members for this submission on Gradescope if applicable. At this point, if you worked in a pair, it is a good idea for both partners to log into Gradescope and check if you can see the uploaded files for Lab08.