Milestone 1 Requirements

For this milestone, you will be creating classes to represent the entrées and sides served at “Dogs ‘N Such” - a fast-food franchise focused on hot dogs. These will be created within the Data project of the solution you accepted from GitHub classroom.

General requirements:

Assignment requirements:

You will need to create

  • Enum classes (2)

  • Hot Dog class

  • Side classes (4)

Purpose:

Review of how to create classes - 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 includes a general identity comment at the top of your files, i.e.:

/*
* Author: Nathan Bean
* Edited by: (Only include if you are not the original author)
* File name: Something.cs
* Purpose: To inform the students of the requirements for this milestone
*/
  • The tests provided in the DataTest project can be un-commented and run to check your work. You should not change these tests - if your code fails, it is your code that needs to change. Note these tests will not catch all possible issues in your code, as you will be adding to them in a future milestone.

Enum Classes

All enums should reside in the DogsNSuch.Data namespace

There are three enums needed:

  • Size - Done for you! Look below and in the repository code.

  • Sausage - The various kinds of sausage available, which include:

    • Beef
    • Pork
    • Kielbasa
    • SpicyBeef
  • Bun - The various kinds of buns available, which include:

    • SesameSeed
    • Hoagie
    • PizzaDough
    • CornBreading

Dog Class

A Dogs ‘N Such hot dog is a combination of bun, sausage, and toppings. You will need to define a class to represent an individual hot dog, which can be customized after creation. You should name this class Dog and declare it in the file Dog.cs in the DogsNSuch.Data namespace. It should have the following properties:

Sausage: A property with the Sausage enum type, representing what sausage this hot dog is composed of. It should default to Beef.

Bun: A property with the Bun enum type, representing the bun the hot dog is served on. It should default to SesameSeed.

Ketchup: A boolean property indicating if the hot dog is topped with ketchup (default true).

YellowMustard: A boolean property indicating if the hot dog is topped with yellow mustard (default true).

BrownMustard: A boolean property indicating if the hot dog is topped with brown mustard (default false).

SweetRelish: A boolean property indicating if the hot dog is topped with sweet pickle relish (default true).

DillSpear: A boolean property indicating if the hot dog is topped with a dill pickle spear (default false).

Sauerkraut: A boolean property indicating if the hot dog is topped with sauerkraut (default false).

ColeSlaw: A boolean property indicating if the hot dog is topped with cole slaw (default false).

ChoppedOnion: A boolean property indicating if the hot dog is topped with chopped onion (default false).

SauteedOnion: A boolean property indicating if the hot dog is topped with sauteed onion (default false).

FriedOnion: A boolean property indicating if the hot dog is topped with fried onion (default false).

TomatoSlices: A boolean property indicating if the hot dog is topped with slices of tomato (default false).

FriedPepper: A boolean property indicating if the hot dog is topped with slices of fried peppers (default false).

Chili: A boolean property indicating if the hot dog is topped with chili (default false).

CheddarCheese: A boolean property indicating if the hot dog is topped with shredded cheddar cheese (default false).

SwissCheese: A boolean property indicating if the hot dog is topped with shredded swiss cheese (default false).

BBQSauce: A boolean property indicating if the hot dog is topped with BBQ sauce (default false).

CreamCheese: A boolean property indicating if the hot dog is topped with cream cheese (default false).

CelerySalt: A boolean property indicating if the hot dog is topped with a dash of celery salt (default false).

FrenchFries: A boolean property indicating if the hot dog is topped with french fries (default false).

FriedPotatoes: A boolean property indicating if the hot dog is topped with fried potatoes (default false).

Price: A readonly property (i.e. it has only a get and no set) of type decimal which is calculated based on the ingredients (see the table below).

Calories: A readonly property of type uint which is calculated based on the ingredients (see the table below).

The price and calories for each ingredient is:

IngredientPriceCalories
Beef sausage1.00200
Pork sausage1.20140
Kielbasa sausage2.00220
Spicy beef sausage1.40210
Sesame seed bun1.00140
Hoagie bun1.00260
Pizza dough2.00130
Corn Breading1.5086
Ketchup0.1019
Yellow mustard0.103
Brown mustard0.1515
Sweet relish0.1020
Dill pickle spear0.203
Sauerkraut0.2027
ColeSlaw0.20291
Chopped Onion0.2034
Sauteed Onion0.2034
Fried Onion0.2034
Fried Peppers0.20172
Tomato Slices0.1834
Chili1.00256
Cheddar Cheese0.50113
Swiss Cheese0.50106
BBQ Sauce0.1029
Cream Cheese0.10291
Celery Salt0.020
French Fries1.00365
Fried Potatoes1.00365

Side Classes

Dogs ‘N Such offers 4 sides:

  • Chili
  • French Fries
  • Fried Potatoes
  • Cole Slaw

Each should have a class declared for it, in its own file. All sides should default to the small size.

Chili

You will need to define a class to represent a side of chili, which can be customized after creation. You should name this class Chili and declare it in the file Chili.cs in the DogsNSuch.Data namespace. It should have the following properties:

Size: A property with the Size enum type, indicating how large the bowl of chili is.

Cheese: A boolean property indicating if the chili is topped with cheddar cheese. It should default to false.

Price: A readonly property (i.e. it has only a get and no set) of type decimal which is $1.00 for small, $2.00 for medium, and $3.00 for large, plus an extra $0.50 for cheese.

Calories: A readonly property of type uint which is 256 calories for small, 384 for medium, and 512 calories for large, plus an additional 113 calories if the chili is topped with cheddar cheese.

French Fries

You will need to define a class to represent a side of french fries, which can be customized after creation. You should name this class FrenchFries and declare it in the file FrenchFries.cs in the DogsNSuch.Data namespace. It should have the following properties:

Size: A property with the Size enum type, indicating how large the serving of french fries is.

Price: A readonly property (i.e. it has only a get and no set) of type decimal which is $1.00 for small, $2.00 for medium, and $3.00 for large.

Calories: A readonly property of type uint which is 360 calories for small, 540 for medium, and 720 calories for large.

Fried Potatoes

You will need to define a class to represent a side of fried potatoes, which can be customized after creation. You should name this class FriedPotatoes and declare it in the file FriedPotatoes.cs in the DogsNSuch.Data namespace. It should have the following properties:

Size: A property with the Size enum type, indicating how large the serving of fried potatoes is.

Price: A readonly property (i.e. it has only a get and no set) of type decimal which is $1.00 for small, $2.00 for medium, and $3.00 for large.

Calories: A readonly property of type uint which is 360 calories for small, 540 for medium, and 720 calories for large.

Cole Slaw

You will need to define a class to represent a side of cole slaw, which can be customized after creation. You should name this class ColeSlaw and declare it in the file ColeSlaw.cs in the DogsNSuch.Data namespace. It should have the following properties:

Size: A property with the Size enum type, indicating how large the serving of cole slaw is.

Price: A readonly property (i.e. it has only a get and no set) of type decimal which is $1.00 for small, $2.00 for medium, and $3.00 for large.

Calories: A readonly property of type uint which is 292 calories for small, 438 for medium, and 584 calories for large.

Submitting the Assignment

Since this is your first Milestone, let’s review how to submit milestones. You will be working out of repository hosted on Github.

Notice the “Releases” button in the top right of the picture. Click this button. You will be brought to the following screen.

Click “Create a new release”. When it loads assign a tag version. I assigned “v.0.1.0”. This is an example of semantic versioning, a common strategy used in software development to indicate different versions of the software. From the definition:

Given a version number MAJOR.MINOR.PATCH, increment the:

  1. MAJOR version when you make incompatible API changes,
  2. MINOR version when you add functionality in a backwards compatible manner, and
  3. PATCH version when you make backwards compatible bug fixes.

The v just indicates ‘version’. Since our library isn’t ready for use yet, we use 0 for the Major version. Since we’ve added some code that includes new features that are backwards compatible (i.e. additional classes won’t cause conflicts with code using no classes), we’ll use 1 for the minor version. And we’ll leave the patch version at 0.

If, after turning in your assignment you realized you missed something, you could create and submit a second release, with version v.0.1.1 (notice the patch version goes up by one because you’ve added a bug fix).

Click the “Publish release” button and use the release URL (copy it from your browser’s address bar) as your submission in Canvas. This is how you will submit all of your milestone assignments.

Review of the week

If you are having trouble with any of the concepts learned this week consider taking a look at the following links.