Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Goals C++: programming basics, OOP C++: working with floating point number Use given unit tests as instruction manual Get comfortable with the grading submission

image text in transcribedimage text in transcribedimage text in transcribed

Goals C++: programming basics, OOP C++: working with floating point number Use given unit tests as instruction manual Get comfortable with the grading submission process Problems To Solve There are TWO problems to solve. Please find the description of the first 2 problem below: Problem 1: (50pt + 10 Extra Credit) Problem 2: (50pt) Code Repo Use the following repo for homework: Code: B> Not using this repo will result in 0 point. General requirements (VERY IMPORTANT): Do not create any new file or delete existing file in the repo. The grader bot checks for this. Do not make modification to any file outside the src and test folders. Do not make modification to any file unless specificially allowed (in comments or told by the instructor). (50pt) Compound Interest The Background "The eighth wonder of the world. He who understands it, earns it; he who doesn't, pays for it. This is the famous quote about compound interest. And here's the definition from Wikipedia B: - Albert Einstein Compound interest is the addition of interest to the principal sum of a loan or deposit, or in other words, interest on interest. It is the result of reinvesting interest, rather than paying it out, so that interest in the next period is then earned on the principal sum plus previously accumulated interest. Note: Compound interest is a general kind of effect that applies to more aspects than finance. We ain't just talking about money here. In simple term, compound interest is about a repeated small step produces acceleratingly large result over time. But be aware that this can manifest as angel or evil, meaning it can be really good or really bad for you. There are numerous ways to benefit or suffer from the effect of compound interest, and a larger issue is that many people learn this too late :( So, let's learn this to stay on the positive side of it, and now. The Task (50pt) The task of this home is to complete a compound interest simulator. Do not use any math library. There are a few distinct features of this task The calculator we are writing is based on this calculator B. Use it to help understand how compound interest works. Lots of our test cases are generated using this calculator. See this for a comparison between the web calculator and our use cases. All tests are given. This serves as validation, but more importantly, use it as a manual to figure out how the code should work. There's only one function for you to write here B. Computation is done in floating point number, so round-off error is an issue. See this for an intro. Extra Credit 1 (5pt) Write a paragraph in a block of comment in problem_1.cpp describing how you would apply the effect of compound interest to your life in a good way. Extra Credit 2 (5pt) Add a new unit test in unit_test_problem_1.cpp to show how you would apply the effect of compound interest financially, but DO NOT CHANGE OR REMOVE EXISTING TESTS! Your test has to pass and make logical sense to get this points. Abstract Data Type (ADT) In a programming language, we are often provided some data type such as integer, float, and even class such as in Java and C++. An Abstract Data Type (ADT) is a fancy term, but it really just means we can create our own data type. In C++ we can do this by using class. For example, List is a very commonly used data type. Similar to array, a list has a few properties: . A List contains a linear sequence of elements A List has a size and capacity, and capacity can be limited or unlimited . Each element in the List has an index of 0, 1, 2, etc. New element can be add to the front or back of the List Element can be removed from a List Lists can be merged into each other And here B's an C++ interface that defines a List ADT: template

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions