Milestone 2 Requirements
This textbook was authored for the CIS 400 - Object-Oriented Design, Implementation, and Testing course at Kansas State University. This section describes assignments specific to the Spring 2023 offering of that course. Prior semester offerings can be found here. If you are not enrolled in the course, please disregard this section.
For this milestone, you will be creating classes to represent the offerings of The Flying Saucer - a fast-food breakfast franchise. These will be created within the Data project of the solution you accepted from GitHub classroom.
General requirements:
You need to follow the style laid out in the C# Coding Conventions
You need to document your code using XML-style comments, with a minimum of
<summary>
tags, plus<param>
,<returns>
, and<exception>
as appropriate.
Assignment requirements:
You will need to create
Enums (2) representing:
- Serving sizes available for certain menu items
- The various egg preparations available
Classes (1+) representing entrees:
- Outer Omelette
- Refactoring the Flying Saucer
Classes (6) representing sides:
- Crop Circle
- Glowing Haystack
- Taken Bacon
- Missing Links
- Eviscerated Eggs
- You’re Toast
Purpose:
This milestone serves as a review of how to create classes and sets the stage for the rest of the semester. Everything included in this assignment you should have been exposed to before in CIS200 and CIS300. This assignment should be relatively straightforward, though it will take some time to complete. If you have any confusion after you have read the entire assignment please do not hesitate to reach out to a Professor Bean, the TAs, or your classmates over Discord.
Recommendations:
Get in the habit of reading the entire assignment before you start to code. Make sure you understand what is being asked of you. Please do not get ahead of yourself and have to redo work because you did not read the entire assignment.
Accuracy is important. Your class, property, enumeration and other names, along with the descriptions must match the specification given here. Otherwise, your code is not correct. While typos may be a small issue in writing intended for human consumption, in computer code it is a big problem!
Remember that you must document your classes. This was covered in prior courses and also discussed in chapter 3 of your textbook.
The KSU.CS.CodeAnalyzers NuGet package installed in your project will automatically flag issues with for naming and commenting conventions in your code with warnings. Be sure to address these!
Create a new feature branch for your milestone and commit your changes to it, and only merge it back into the master branch when you’ve completed the assignment.
You may be wondering why we ask you to create a feature branch rather than working in main
, especially as it seems extra work. There are two reasons:
- It is good practice for the future when you are working on a team. Each team member typically has their own branch. That way, as you add incomplete code to your branch, your changes don’t impact the other team member’s work. You only merge your new features to
main
when they are complete, tested, and working. - If the UTA asks you to correct a mistake in a former milestone and re-commit, you can switch back to that branch, fix the mistake, create a new release and turn it in. All without being impacted by your half-done work on the new milestone branch. Then, you can merge the update to
main
into your current milestone branch so that you have them moving forward.
Enum Classes
Each enumeration should be placed in a file named according to the enum, i.e. ServingSize
should be defined in ServingSize.cs.
The needed enumerations are:
EggStyle
- The various ways an egg can be prepared- SoftBoiled
- HardBoiled
- Scrambled
- Poached
- SunnySideUp
- OverEasy
ServingSize
- The size of the menu item- Small
- Medium
- Large
To get you started, here’s the ServingSize
enum defined:
/// <summary>
/// The size of a menu item
/// </summary>
public enum ServingSize
{
Small,
Medium,
Large
}
Entree Menu Item Classes
You will need to create one new class OuterOmelette
, and refactor another, FlyingSaucer
to represent specific entrees offered at The Flying Saucer.
Flying Saucer
The FlyingSaucer
class provided in the starter project has an issue - the Price
is constant at $8.50, regardless of the number of pancakes in the stack. You’ll need to refactor the Price
property so that when additional pancake is added, the price of the entree increases by $0.50, and when a pancake is removed, it is decreased by $0.50.
Outer Omelette
You will need to create a class to represent the Outer Omelette entree named OuterOmelette
. The structure of this class is detailed in the UML below (you may add additional private members as needed).
The specific values for the OuterOmelette
properties are described in the table below
Property | Accessors | Type | Value |
---|---|---|---|
Name | get only | string | "Outer Omelette" |
Description | get only | string | "A fully loaded Omelette." |
CheddarCheese | get and set | bool | Defaults to true |
Peppers | get and set | bool | Defaults to true |
Mushrooms | get and set | bool | Defaults to true |
Tomatoes | get and set | bool | Defaults to true |
Onions | get and set | bool | Defaults to true |
Price | get only | decimal | $7.45 |
Calories | get only | uint | 94 for the eggs in the omelette, plus 113 calories for cheddar cheese, 24 calories for peppers, 4 calories for mushrooms, 22 calories for tomatoes, and 22 calories for onions |
SpecialInstructions | get only | IEnumerable〈string〉 | For any ingredient not used, should include "Hold [ingredient]" where [ingredient] is the name of the ingredient, i.e. if the CheddarCheese property is false, it should include "Hold Cheddar Cheese" |
Side Menu Item Classes
You will need to create classes to represent the six sides Crop Circle, Glowing Haystack, Taken Bacon, Missing Links, Eviscerated Eggs, and You’re Toast.
Crop Circle
The structure for the CropCircle
class appears in the UML diagram below:
The specific values for the CropCircle
properties are described in the table below
Property | Accessors | Type | Value |
---|---|---|---|
Name | get only | string | "Crop Circle" |
Description | get only | string | "Oatmeal topped with mixed berries." |
Berries | get and set | bool | Defaults to true |
Price | get only | decimal | $2.00 |
Calories | get only | uint | 158 calories, plus 89 calories if berries are included |
SpecialInstructions | get only | IEnumerable〈string〉 | Includes "Hold Berries" if the Berries property is false. |
Glowing Haystack
The structure for the GlowingHaystack
class appears in the UML diagram below:
The specific values for the
GlowingHaystack
properties are described in the table below
Property | Accessors | Type | Value |
---|---|---|---|
Name | get only | string | "Glowing Haystack" |
Description | get only | string | "Hash browns smothered in green chile sauce, sour cream, and topped with tomatoes." |
Green Chile Sauce | get and set | bool | Defaults to true |
Sour Cream | get and set | bool | Defaults to true |
Tomatoes | get and set | bool | Defaults to true |
Price | get only | decimal | $2.00 |
Calories | get only | uint | 470 calories, plus 15 calories for green chile sauce, 23 calories for sour cream, and 22 calories for tomatoes |
SpecialInstructions | get only | IEnumerable〈string〉 | For any ingredient not used, should include "Hold [ingredient]" where [ingredient] is the name of the ingredient, i.e. if the GreenChileSauce property is false, it should include "Hold Green Chile Sauce" |
Taken Bacon
The structure for the TakenBacon
class appears in the UML diagram below:
The specific values for the TakenBacon
properties are described in the table below
Property | Accessors | Type | Value |
---|---|---|---|
Name | get only | string | "Taken Bacon" |
Description | get only | string | "Crispy strips of bacon." |
Count | get and set | uint | Defaults to 2 strips of bacon |
Price | get only | decimal | $1.00 per strip of bacon |
Calories | get only | uint | 43 calories per strip of bacon |
SpecialInstructions | get only | IEnumerable〈string〉 | For any number of strips but two, should include "[n] strips" where [n] is the count. |
Missing Links
The structure for the MissingLinks
class appears in the UML diagram below:
The specific values for the MissingLinks
properties are described in the table below
Property | Accessors | Type | Value |
---|---|---|---|
Name | get only | string | "Missing Links" |
Description | get only | string | Sizzling pork sausage links." |
Count | get and set | uint | Defaults to 2 sausage links |
Price | get only | decimal | $1.00 per sausage link |
Calories | get only | uint | 391 calories per link of sausage |
SpecialInstructions | get only | IEnumerable〈string〉 | For any number of links but two, should include "[n] links" where [n] is the count. |
Eviscerated Eggs
The structure for the EvisceratedEggs
class appears in the UML diagram below:
The specific values for the EvisceratedEggs
properties are described in the table below
Property | Accessors | Type | Value |
---|---|---|---|
Name | get only | string | "Eviscerated Eggs" |
Description | get only | string | "Eggs prepared the way you like." |
Style | get and set | EggStyle | Defaults to over easy |
Count | get and set | uint | Defaults to 2 eggs |
Price | get only | decimal | $1.00 per egg |
Calories | get only | uint | 78 calories per egg |
SpecialInstructions | get only | IEnumerable〈string〉 | Should always contain a string corresponding to the Style property, i.e. if the Style property is EggStyle.OverEasy it should contain the string "Over Easy". If any number of eggs other than 2 is chosen, it should also contain "[n] eggs" where [n] is the number of eggs. |
You’re Toast
The structure for the YouAreToast
class appears in the UML diagram below:
The specific values for the YouAreToast
properties are described in the table below
Property | Accessors | Type | Value |
---|---|---|---|
Name | get only | string | "You're Toast" |
Description | get only | string | "Texas toast." |
Count | get and set | uint | Defaults to 2 slices of toast |
Price | get only | decimal | $1.00 per slice of toast |
Calories | get only | uint | 100 calories per slice of toast |
SpecialInstructions | get only | IEnumerable〈string〉 | For any number of slices but two, should include "[n] slices" where [n] is the count. |
Submitting the Assignment
Once your project is complete, merge your feature branch back into the main
branch and create a release tagged v0.2.0
with name "Milestone 2"
. Copy the URL for the release page and submit it to the Canvas assignment.
Grading Rubric
The grading rubric for this assignment will be:
25% Structure Did you implement the structure as laid out in the specification? Are the correct names used for classes, enums, properties, methods, events, etc? Do classes inherit from expected base classes?
25% Documentation Does every class, method, property, and field use the correct XML-style documentation? Does every XML comment tag contain explanatory text?
25% Design Are you appropriately using C# to create reasonably efficient, secure, and usable software? Does your code contain bugs that will cause issues at runtime?
25% Functionality Does the program do what the assignment asks? Do properties return the expected values? Do methods perform the expected actions?
Projects that do not compile will receive an automatic grade of 0.