Reproduce and adapt commonly used basic algorithms

Assignment Help Programming Languages
Reference no: EM133531033

Fundamentals of Programming

ASSIGNMENT - Mortgage Calculator

Overview
In this assignment you will have the opportunity to test your Python skills in developing classes and using matplotlib library. Throughout the assignment you are expected to apply the principles of problem solving that we have already discussed in this course.

Learning Outcome 1: Identify and use the correct syntax of a common programming language.

Learning Outcome 2: Recall and use typical programming constructs to design and implement simple software solutions.

Learning Outcome 3: Reproduce and adapt commonly used basic algorithms.

Learning Outcome 4: Explain the importance of programming style concepts (documentation, mnemonic names, indentation).

Skills:
S2. Write and implement a solution algorithm using basic programming constructs.
S3. Demonstrate debugging and testing skills whilst writing code.

Application of knowledge and skills:
A1. Develop self-reliance and judgement in adapting algorithms to diverse contexts.
A2. Design and write program solutions to identified problems using accepted design constructs.

ASSESSMENT DETAILS

Introduction. Your assignment is to write a Python program that takes inputs for the Loan Amount, Loan Term and Interest Rate and then calculates and displays values of Weekly (Fortnightly, Monthly) Repayments. Also, the program plots the values of Remaining Principal by years.

Below is explained how to calculate these values:

First, let's assume the following notations (in your program, you will input these values from the command line):
L - loan amount in AUD. Y - loan term in years. p - interest rate.
k - repayment frequency in days (i.e., weekly - 7 days, fortnightly - 14 days, monthly - 30 days).
Repayments, P0, are calculated by the following formula:

1. Programming Tasks

Task 1.1. Develop a Mortgage class.
The class should have the following attributes (instance variables):
loan - for the loan amount in AUD. years - loan term in years. interest - interest rate.
r_frequency - repayment frequency in days.
These attributes should be defined in the constructor, init . Also, the class should define the following methods:
repayments(self) - calculates the value of repayments using the formula provided in the introduction (for P0) and returns the calculated value.

balance_after(self,n) - calculates the remaining balance (debt) after n years using the formula provided in the introduction (for Bn) and returns the calculated value.

str (self) - returns user readable string representation of a mortgage object, i.e.: loan amount, loan term, interest and repayments. The output of this method should be similar to the following:

Loan Amount: 100000.0 AUD Loan Term (Years): 20 Interest: 4.8%
Fortnightly Repayments: 298.61

draw_balance_graph(self) - using the matplotlib library, the method plots a graph of the Remaining Balances by years using balance_after method. The output of this method should be similar to the following:

Task 1.2. Write a main() function.

This should be your main program that:

1. Prompts and takes inputs for the loan amount, loan term, interest rate and repayment frequency.
2. Creates a Mortgage object using the entered values.
3. Using the Mortgage object's methods, prints the mortgage information on screen and, and if required, plots the mortgage balances by years.

You are required to use exception handling to make your program robust (foolproof) i.e., if the user enters an incorrect value, the program won't crash, but instead it will prompt the user to enter a correct value. Use the following constraints for the correct inputs:

loan - must be a positive float value. years - must be a positive int value. interest - must be a positive float value.
r_frequency - must be one of the following values: 7, 14, or
30.

3. Below is an example of the program's run. Please note how it handles incorrect values:

Your documentation should be in PDF format.
Assignments will be marked on the basis of fulfilment of the requirements and the quality of the work.
In addition to the marking criteria, marks may be deducted for failure to comply with the assignment requirements, including (but not limited to):
• Incomplete implementation(s), and
• Incomplete submissions (e.g., missing files), and
• Poor spelling and grammar.
You might be asked to demonstrate and explain your work.

Attachment:- Mortgage Calculator.rar

Reference no: EM133531033

Questions Cloud

The Eleventh Circuit noted that Teleco had been privatized : The Eleventh Circuit noted that Teleco had been "privatized" from 2008 to 2009, but apparently, the Haitian government retained a majority of the stock.
Paternalistic deception-euthanasia-genetic engineering : There were 8 topics covered in this course: paternalistic deception, euthanasia, genetic engineering, health care rights and systems, human challenge trials
How does choice of leadership style help or hinder unit : How does choice of leadership style help or hinder unit readiness? What leadership attributes or competencies do you think are necessary to be a successful Army
Who is facing the challenges including adapting to fashion : write the Pestel analyses, Porters 5 forces, swot analyses on the Empire Clothing company, Canada who is facing the challenges including adapting to fashion
Reproduce and adapt commonly used basic algorithms : ITECH1400 Fundamentals of Programming, Federation University - Identify and use the correct syntax of a common programming language.
How long did the average passenger have to wait in line : How long did the average passenger have to wait in line? what maximum average number of waiting passengers would ensure that the average waiting time is
Received multiple written warnings for poor attendance : You are the food and beverage manager of a hotel in Fort Lauderdale, Florida. Joan, has already received multiple written warnings for poor attendance
What might be some warning signs of a weak quality culture : What might be some "warning signs" of a weak quality culture? For example, one might be "senior executives rarely discuss quality." List at least three
Analyze the hazards associated with the roofing : Analyze the hazards associated with the roofing and the interior work. You should identify at least three hazards for each activity. Perform a risk assessment

Reviews

Write a Review

Programming Languages Questions & Answers

  How would you help children who speak a different language

How would you help children who speak a different language from others in the class learn to communicate and play with others?

  Write program to show percentage of calories come from fat

Write a program which asks user to enter number of calories and fat grams in a food item. The program must display percentage of the calories that come from fat.

  Write a mips assembly program

Write a MIPS assembly program that will make use of the function count above as follows: Let's assume you are asked to code a car-finding system for a local parking lot

  Create a new project in your ide named exceptionhandler

Create a new project in your IDE named "ExceptionHandler." Write code to accept numbers as described above from the user. Your code should ensure that only numbers are accepted.

  Create a program that allows stores data

Create a program that allows stores data about an entity in a record in your program, and then echo this back to the terminal - Effectively organising your data makes programs much easier to develop.

  Create two graphs that displays the latest number

Create two graphs that displays the latest number of COVID-19 cases of the top 15 and bottom 15 countries, respectively. Consider how to improve the quality

  Ms word versus other processing program

MS word Versus other processing program

  Describe the key elements for effective documentation

Describe at least six types of user and technical documentation that you are likely to come across in an ICT environment - describe the process that you would use to review current versions of technical and user documentation.

  Write program to calculate diameter in centimeters of rod

Write program to calculate diameter in centimeters of a steel rod, an aluminum rod, and a copper rod, which can withstand a particular compression load.

  Write a program that will take integers from the user

Write a program that will take 7 integers from the user, store them in an array. Write three functions which takes the aforementioned array as input.

  Network programming

From where does the template class derived from in network programming?(

  Write templates for the two functions minimum and maximum

Write templates for the two functions minimum and maximum. The minimum function should accept two arguments and return the value of the argument that is the lesser of the two.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd