Skip to content

aliarman1373/InvestementAPP

Repository files navigation

MYP Senior Engineer Test

Build an investment app API.

It should allow you to:

  • Add an investment

    • An investment should include:
      • Name
      • Start Date
      • Interest Type: Simple or Compound
      • Interest Rate
      • Principle Amount
    • The name of an investment should be unique
  • Update an investment

  • Delete an investment

  • Fetch Investment

    • Returning:
      • Name
      • Start Date
      • Interest Type: Simple or Compound
      • Interest Rate
      • Principle Amount
      • Current value of the investment rounded to the nearest month
    Acceptance Criteria 1
    GIVEN an investment is of type simple
    WHEN interest is calculated
    THEN a value is returned equal to  A = P(1 + rt)
    AND the period is rounded to the nearest month
    
    Where:
    A = Total Accrued Amount (principal + interest)
    P = Principal Amount
    I = Interest Amount
    r = Rate of Interest per year in decimal
    t = Time Period involved in months or years
    See https://www.calculatorsoup.com/calculators/financial/simple-interest-plus-principal-calculator.php
    
    Acceptance Criteria 2
    GIVEN an investment is of type compound
    WHEN interest is calculated
    THEN a value is returned equal to  A = P(1 + r/n)nt
    AND the compounding perdiod is Monthly
    AND the period is rounded to the nearest month
    
    Where:
    A = Accrued amount (principal + interest)
    P = Principal amount
    r = Annual nominal interest rate as a decimal
    n = number of compounding periods per unit of time
    t = time in decimal years; e.g., 6 months is calculated as 0.5 years. 
    See https://www.calculatorsoup.com/calculators/financial/compound-interest-calculator.php
    
    Acceptance Criteria 3
    GIVEN an investment exists
    WHEN the investement is fetched via the API
    THEN the investment is returned
    AND the current value of the investment is returned calculated rounding to the nearest month
    
    
  • Authentication is not needed

  • In memory DB is acceptable

  • It should be extensible

  • Quality should be high

Instructions:

  • Push your solution to your github repo
  • Please use your commits to tell a story (i.e. not one big commit)
  • Be ready to answer questions about your choices
  • Send an email with:
    • A link to your repo
    • Summary of what you have improved including why
    • Any changes/improvements de-prioritised and not implemented with notes on your decision

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages