GithubHelp home page GithubHelp logo

the1michaelt / designpatterns_lab Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 18 KB

This console app takes customer orders for food items at multiple restaurants and prints the receipt of goods sold to a text file.ur

Python 100.00%
console-application output-to-file printable-reports python print-to-file

designpatterns_lab's Introduction

designPatterns_Lab

Restaurant Entrepreneur Project Tech Stack  Python User Stories Total Unweighted Project Points: /55 Total Weighted Project Points: /20

Main Stories

(5 points): As a developer, I want to create my classes and methods according to the UML. (5 points): As a developer, I want to create an Order parent class and 3 child classes to represent menu items of my choosing (2.5 points): As a developer, I want to create an Order Factory class with a static create_order method. (10 points): As a developer, I want to utilize a Factory Pattern in the create_order() method to instantiate instances of the three different Order child classes. This method should accept a string as a parameter (ex “Pizza”) and return the corresponding type of Order child class instantiation (ex Pizza() ) (2.5 points): As a developer, I want to create a log.txt file to keep track of my business. (10 points): As a developer, I want to create a Logger class with a log_transaction() method that will accept an Order object and store number and: Increase the Logger’s transaction_count by one Add the price of the Order object to the Logger’s daily income Open the log.txt file Write a well-formatted message to the log.txt file containing the current transaction count, the name of the dish ordered, the store it was ordered from, the price of the item, and the combined daily income. Close the log.txt file. (5 points): As a developer, I want to use the Singleton pattern (as shown in the Design Patterns Demo repo) to create a single instance of a Logger object inside the logger.py file and import this instance into the Franchise class to be shared by all instantiations. (10 points): As a developer, I want to create a Franchise class with a place_order() method that will:  ask a user what food they would like to order call the static OrderFactory.create_order() method to instantiate an order object. call the logger.log_transaction() method to log the order to the log.txt file (5 points): As a developer, I want to create a Simulation class with a run_simulation() method to act as a facade pattern. The run_simulation() method should: Instantiate 3 separate Franchise objects. Call place_order on each franchise object multiple times.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.