Skip to content

iahmed93/cup-cakes-revenues

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cupcakes Revenues Calculator (weekly project club)

Problem Statement

Arthur has a client, Matilda. Matilda is 68 years old and sells cupcakes. Matilda is not a big fan of spreadsheets, accounting software, or computers in general really.

Every so often Matilda sends Arthur three files:

Basic.txt, Delux.txt, and Total.txt (Download examples here)

Naturally, as any savvy business owner, Matilda wants to understand her business. So she sends Arthur those files and wants to know: "How much money did I make last year? How much money do I make in a typical month? Can you help, please? I do need your help, I'm very busy baking cupcakes, and my arthritis flares up when I spend a whole day on the calculator."

To be totally honest, Arthur is not Matilda's biggest fan right now. Arthur is glad he finally got her to type up this info and email it instead of faxing it, but she flat out won't do anything more complicated than this.

It could be worse, Matilda is a woman of routine:

  • These documents never have dates, each line was entered on a different day. The bottom-most row is always 'Today', the row above that is 'Yesterday', and so on.
  • The files are always lined up perfectly, you never have to worry about them being 'out of sync' or anything like that.
  • Basic.txt is the number of basic cupcakes she sold on that day, and they cost $5.
  • Deluxe.txt is the number of Deluxe cupcakes (they have sprinkles!) sold on that day, and they cost $6.
  • Total.txt is the total money she made (let's not even think about taxes yet, ugh).

Matilda every so often wants to know:

  1. Yearly Revenue Totals
  2. Monthly Revenue Totals
  3. Weekly Revenue Totals

Prerequisites

Install NodeJS

Installation

  1. Clone the project.
  2. Go to the project directory and run the following commands in terminal:
    • npm install
    • npm start
  3. Go to http://localhost:3000
  4. Try it using the 3 test files in docs/files directory.

Next

  • Add Charts
  • Refactor the code

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published