[CS200.P1] 💻 Project - Units 1 and 2

CS 200: Concepts of Programming with C++, Summer 2022

Assignment turn-in link: CANVAS TURN IN

📝 Assignment

Programming projects are meant to assess how much you've learned of the topics. This is meant to be a solo assignment, though you can brainstorm with others. Please do not share code files.

Students, feel free to brainstorm, share ideas, and share snippets of code in the Unit 2 'Help!' discussion board. If you get stuck, you can also post where you're stuck and the instructor (and other students) will give you hints!

🔧 Setup

FIRST, from your "My Repls" page on Repl.it create a New folder for Projects and assignments name it Projects. Within this folder you will create a separate repl for each project. Currently, we're just working on Project 1. Name your new Repl "CS200.P1". When you turn in the assignments, you will copy the URL to your replit project as the submission.

🎁 Submitting your work

Make sure your project is in the Projects folder. If they're not you can click on the three dots on the right side of the program name and click "Move".

To submit your work, navigate to the folder for THIS project on replit. Copy the URL to that directory (e.g., https://replit.com/@rsingh13/CS200P1) and paste it in here in Canvas.


Required items

See the example project submission here:


💻 Requirements

Quick jump: Functionality | User interface | Code style | Documentation | Example program output

Functionality

The program will take in a set of arguments:

  1. amount of pizzas
  2. amount of sauces
  3. amount of cheeses
  4. amount of meats
  5. amount of vegetables

(For example, if somebody wanted both tomato sauce and buffalo sauce, that would be 2 sauces.)


The program should contain a series of named constants for the price of each type of ingredient:

IngredientPrice for 1
Pizza base$10.00
Sauce$0.75
Cheese$1.00
Meat$1.25
Veggie$0.90

The program should calculate the total cost of the pizzas. It is assumed that every pizza is the same. The output will then be displayed in a breakdown of ingredient prices multiplied by how many of that ingredient are wanted. The final price is going to be the amount of all the ingredients times the total amount of pizzas.

User interface

The user interface should be clear and easy for a new user to understand.

Code style

Make sure to follow the C++ Style Guide for this course.

Documentation

Your documentation for the project should contain the following. Think of the documentation as being for a client who is going to use your program, rather than "for the instructor".

The documentation should be uploaded into your replit project.

The documentation file should be typed up and exported in PDF format. Documentation should contain:

  • A summary of the program and what it does.
  • A list of test cases for the program.
  • Screenshot(s) of the program running.
  • Postmortem answers - What went well? What didn't go well? What will you do differently next time?
  • Citations of any code referenced or used not written by yourself.

See the example project submission here:

Example program output

Note: Your program name can just be "./main", the default.

Not enough arguments:

./pizza
NOT ENOUGH ARGUMENTS
Expected form: ./pizza pizzaAmount sauceAmount cheeseAmount meatAmount veggieAmount
0 is none, 1 is one serving, 2 is double portion, and so on.

Ordering 1 pizza with 1 of each topping:

./pizza 1 1 1 1 1
PIZZA ORDER

PER PIZZA:
* 1  crust   @ $10.00 per crust.... $10.00
* 1  sauces  @ $0.75  per sauce.... $0.75
* 1  cheeses @ $1.00  per cheese... $1.00
* 1  meats   @ $1.25  per meat..... $1.25
* 1  veggies @ $0.90  per veggie... $0.90

TOTAL PER 1 PIZZA: $13.90
TOTAL PIZZAS:      1 x $13.90 per pizza
TOTAL:             $13.90

Ordering various amounts of each item:

./pizza 5 3 2 3 4
PIZZA ORDER

PER PIZZA:
* 1  crust   @ $10.00 per crust.... $10.00
* 3  sauces  @ $0.75  per sauce.... $2.25
* 2  cheeses @ $1.00  per cheese... $2.00
* 3  meats   @ $1.25  per meat..... $3.75
* 4  veggies @ $0.90  per veggie... $3.60

TOTAL PER 1 PIZZA: $21.60
TOTAL PIZZAS:      5 x $21.60 per pizza
TOTAL:             $108.00