Giter Club home page Giter Club logo

market-store's Introduction

Market-Store

Market Store Assignment A market store offers to their clients three different types of discount cards: bronze, silver and gold. Each card stores information about its owner, the turnover for the previous month and the initial discount rate. With each card you can calculate the discount of the current purchase. In general this is done using the formula: valueOfPurchase * discountRate. The bronze card comes with no discount rate if the turnover for the previous month is below $100. If it is between $100 and $300, the discount rate is 1%. And if it is above $300, the rate is 2.5%. The silver card comes with an initial discount rate of 2%. In case, the turnover is above $300, the rate is 3.5%. The gold card comes with an initial discount rate of 2%. The discount rate grows 1% for each $100 from the turnover, capping at 10%. Your task is: • to write an object-oriented model of this market store system; • to create a class that contains method(s) that output the discount rate, the discount and the total purchase value; • in your application entry point: o create instances with sample data as shown in Example outputs section; o invoke method(s) to print the required information. Example output

  1. Bronze: a. Mock data: turnover $0, purchase value $150; b. Output: o Purchase value: $150.00 o Discount rate: 0.0% o Discount: $0.00 o Total: $150.00
  2. Silver: a. Mock data: turnover $600, purchase value $850; b. Output: o Purchase value: $850.00 o Discount rate: 3.5% o Discount: $29.75 o Total: $820.25
  3. Gold:

a. Mock data: turnover $1500, purchase value $1300; b. Output: o Purchase value: $1300.00 o Discount rate: 10.0% o Discount: $130.00 o Total: $1170.00

market-store's People

Contributors

kiril24us avatar

Watchers

 avatar

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.