Skip to content

Latest commit

 

History

History
63 lines (51 loc) · 2.49 KB

midterm-project.adoc

File metadata and controls

63 lines (51 loc) · 2.49 KB

Midterm Project

Dosa

The owner of a new Dosa restaurant wants you to take a look at the orders they’ve received in the past year and see if you can help them design a better system. So far all they have kept track of are the individual orders that have come in.

Inside the midterm_project directory in the class git repo you will find a file called example_orders.json that contains sample data for you to work with. You can practice with this data but please note that a new set of orders will be generated (using the same format) to evaluate your project.

Your goals are to write a Python script that:

  1. Reads the JSON orders from a file whose name is passed as the first positional argument

  2. Creates a new JSON file named customers.json that contains an object with phone numbers as keys and customers names as values. The phone number and customer name should both be strings and the phone number should be of the form xxx-xxx-xxxx

    {
        "609-555-0124": "Karl",
        "732-555-1234": "Mike",
        ...
  3. Create a new JSON file named items.json that contains an object with item names (string) as keys and an object with price (key=price, number) and number of times it has been ordered (key=orders, number) as a value:

    {
        "Butter Masala Dosa": {
            "price": 12.95,
            "orders": 52
        }
        "Butter Mysore Masala Dosa": {
            "price": 11.95,
            "orders": 12
        }
        ...

The following rubric will be used to evaluate your project:

Category Points Available Description

Version Control

5

Your project should be hosted in a git repository on GitHub. Private repositories are fine, just make sure that rxt1077 is invited as a collaborator. Your repository should have a commit log with at least three commits demonstrating your progress in working on this project.

Python Conventions

5

Your project should follow Python conventions for programming style and use idiomatic Python approaches to solving problems.

Documentation

5

Your project should include a README.md file in the root of the project explaining what it does, how it is designed, and how to use it.

Functionality

10

Your project should implement the core functionality as described in the goals above.