Calculated data should be supplied via methods

Assignment Help Basic Computer Science
Reference no: EM13760361

You are an independent consultant who has been hired to create a software application for a local real estate agency. The realtor wants to store all his customers along with their mortgage information, and he wants to look them up if he needs to. He also wants to keep track of when customers make payments so he can tell them how they are progressing with their mortgages. Finally, he wants to be able to search for a customer by name or id so he can pull up their records and access their mortgage quickly.

Your job is to design an application to accomplish these objectives. The realtor provides you with the following information:

Customers

A customer has a unique ID, a first and last name, address, and contact information, i.e. a telephone number or an e-mail address. The realtor only works with customers in the United States and Canada. Since mortgages are calculated differently in these two countries, he needs to know which country the customer lives in. Finally, a customer has one or more mortgages.

Mortgages

A mortgage belongs to a customer, but it has its own unique id. That way, the realtor can easily search for a specific mortgage or a specific customer. Every mortgage has an annual interest rate from 1 to 100 percent, principal (the initial amount of the loan), and the length of the loan in years. The mortgage should also have a payment history that stores payments. Each payment has a date and an amount. The realtor must be able to obtain the monthly payment for the mortgage. He also wants to be able to tell the customer his/her remaining principal on the mortgage given the number of payments already made. We can assume that each payment made is equal to the fixed amount.

The formula for calculating the monthly payment for a U.S and Canadian mortgage is at this web site: https://www.hughchou.org/calc/formula.html. You can also find the formula for the total remaining payments on this page.

The program should allow the realtor to add, edit and delete customers. Just to be safe, the realtor doesn't want to be able to delete a customer if he/she has mortgages without asking for verification first. As far as the mortgages go, once a mortgage is created, the program shouldn't let the user edit its terms. However, the Realtor does want to be able to "play" with the terms to see how it would affect the monthly payments. That said, the temporary changes made should not be saved. If the user wants to delete a mortgage, the program needs to ask for confirmation.

Searches

The realtor wants to be able to do a quick search for a customer given their ID or their name. He also wants to be able to quickly look up a mortgage if he knows the ID of the mortgage. In either case, when a match is found, the program should show the customer, the mortgages, and then hone in on the specific mortgage if that's how the realtor did the search. If the realtor searches by customer, the first mortgage stored is fine. Almost all of his customers will only have one mortgage, but the program has to be able to handle more than one since some customers have multiple properties.

Odds and Ends

The realtor wants to make sure all the data entered is valid. So make sure nothing can be entered and saved that is out of range or invalid. He also wants the data stored in a file that he will regularly back up himself. The data should be saved whenever a transaction is made rather than held until the program closes down. That way if the user makes a bunch of changes and suddenly the power goes out, he won't lose all of his work. The data should get loaded into the program when it is first run. You have a custom of placing a menu in your main window that has File - Exit and Help - About at a minimum. The Help - About menu should bring up a modal dialog that lists, at a minimum, who wrote the program and when it was written.

Design

The design of the program is completely up to you. I suggest that you break the features down in the order that you would like to implement them, and then iterate through them (implement feature / test / demo / implement / test / demo). In our case, demos will be held once per week in class. Please follow the guidelines shown below, as you will be graded on the quality of the code you write as well as the quality of the user experience.

Assessment

Your program will be assessed on the following three criteria:

· The customer's requirements are fully met (50%)
· The quality of the user experience (25%)
· The quality of the code itself (25%)

Obviously, the program has to do what the customer wants, so the first criterion will carry the most weight. With regard to the second item, there are easy-to-understand, clean, simple ways to do things, and difficult, non-intuitive, cluttered and confusing ways. Part of your grade will be determined by how simple the program is to use, how easy it is to work with the user interface, and how fault tolerant the program is. Here are some helpful guidelines with regard to the user interface:

1. This program is going to be used to enter customers and their mortgage(s) as well as to look up existing customers and their mortgages to add payments and obtain information. Do not try to do everything in one great, big window. Divide up tasks in a way that makes sense, giving the user clear options along the way.

2. Think of a dialog like a room. You go into the room for a specific task, and then you get out back in to the main room. Always make sure dialogs do one specific thing for the user and that they can OK or Cancel out of the dialog.

3. Your main window should have a menu with File - Exit and Help - About at a minimum. The Help - About menu should bring up a modal dialog that lists, at a minimum, who wrote the program and when it was written.

4. Do not store items into list boxes. Instead, put them into collections. If the user wants to find a specific customer, the customer's name or id should be entered. Putting everything into a list box is not practical when you have thousands of customers.

5. Your program should require the user to think as little as possible about the mechanics and navigation of the program itself, letting the user focus on the data he or she wants to obtain and manipulate.

You will also be graded by the quality of the code you write. Here are some guidelines for the program itself:

1. Your program should use classes and objects, inheritance, polymorphism, collections that use generics, and exceptions. How you use these tools is up to you, but your goal is to reduce complexity and, most of the time, less lines of code. I say most of the time because there is a balance. You can try to do everything in one line of code, but it might be clearer if you write it in three lines.

2. Create, at a minimum, the following entities:

a. A Mortgageclass that contains all of the necessary properties and methods. Put all your calculations in this class or one of its child classes if you wish to use inheritance.

b. Use strongly-typed collections to store your Customers, Mortgages, Payments, and anything else that you have multiple copies of.

c. Use composition, i.e. put objects inside of objects.

d. Use exception handling to anticipate and handle errors and problems such that the program does not crash under any circumstances from user input.

e. Use file I/O to store the data for the program, placing the file in the same folder as the executable.

3. Avoid duplication of code wherever possible. Class inheritance is a good way to accomplish this.

4. If you use inheritance, and you have base classes that are too generic to be used on their own, make sure they are marked MustInherit.

5. If a method doesn't rely on a specific instance of an object, mark it Shared.

6. Calculated data should be supplied via methods, not properties. If, when a method is called, one or more properties you need is not set, throw an exception stating which properties must first be set.

7. Use error handling throughout the program to ensure errors are caught and properly dealt with. The program should never "crash" no matter what kind of data it is fed.

8. Use class serialization to store all of your data into a file. When the program closes, save the data, and when the program opens, load it back in. You may need to do some research on serialization and file I/O if this is new to you. Research is a normal part of programming. We often run into things we need to do that we've never done before. And so this is good practice at figuring out new concepts by accessing helpful resources.

9. Documentation is very important in programming. We all hate to do it at the time, but years later when you look back at your program, you will be very glad you did. So be sure to add in comments wherever appropriate.

Reference no: EM13760361

Questions Cloud

Define the aircraft axes and degrees of freedom : Define the aircraft axes and degrees of freedom. Analyse the different maneuvers that can be done by an aircraft.
Do you think esperanza is lonely : Do you think Esperanza is lonely? Why do you think Cisneros creates an alter-ego for herself in this book?
Interrelationship of the cash flow statement : Discuss the interrelationship of the cash flow statement to the other financial statements. In your discussion comment and explain operating activities, investing activities, and financing activities.
Network security question : What are the predominant electronic and physical threats to communications networks?
Calculated data should be supplied via methods : Calculated data should be supplied via methods, not properties. If, when a method is called, one or more properties you need is not set, throw an exception stating which properties must first be set.
What role of hospitality industry in community you live in : What is the role of the hospitality industry in the community you live in? How does hospitality play a role in the implementation of tourism throughout the world?
Unethical labor practices by utilizing sweatshop labor : A clothing company uses sweatshop labor to manufacture clothing products that contribute to low pricing, which is a consumer want. Many companies have engaged in sweatshop labor. Did the clothing company engage in unethical labor practices by util..
Discussion about ifrs versus gaap : Write a 700- to 1,050-word summary of the team's discussion about IFRS versus GAAP, based on your team collaborative discussions. The summary should be structured in a subject-by-subject format. An introduction and a conclusion are needed. Your es..
Ipv6 transition technology : What record must be added to a DNS zone file to alias a host to another name? Complete this sentence with an appropriate phrase or follow-on sentence.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Aspects of information security risk management

What are the critical considerations when dismissing an employee? Do these change according to whether the departure is friendly or hostile, or according to which position the employee is departing from?

  Identifying the risks associated with the current position

Be sure to add a conclusion with a rationale detailing how risks can be mitigated. Reference your research so that Sean may add or refine this report before submission to senior management.

  Use the raptor to complete the problem

Use the Raptor to complete the problem, Input names of students from the user, terminated by "ZZZ", 0, 0, 0, and create a data file grades with records of the following form: student (string), test (integer), test 2 (integer), test 3 (integer)

  Determine the size and contents

Determine the size and contents of: e=1:-1:5;

  Explaining relationship of strategic and tactical plans

Descriibe in scholarly detail relationship of strategic, tactical, and operational plans,

  F denotes false and t denotes true

F denotes false and T denotes True

  Secure windows-unix-linux servers from known shortcoming

The CIO has asked you to explain why you suggest it is so significant to secure your Windows and Unix/Linux servers from known shortcomings/vulnerabilities.

  Compute the cost of sorting the relation in seconds

Suppose a flash storage device is used instead of disk, and it has a seek time of 1 microsecond and a transfer rate of 40 MB per second. Recompute the cost of sorting the relation in seconds with.

  A boolean matrix has the parity property

A Boolean matrix has the parity property when each row and each column has an even sum, i.e. contains an even number of bits which are set. Here's a 4 x 4 matrix which has the parity property:

  Write a few lines of code to create a timer in java

Write a few lines of code to create a timer in Java which fires an ActionEvent every 150 msec. Assume the existence of a TimerEventHandler class which needs to respond to timer events.

  Demonstrate at least two arithmetic features

Demonstrate at least two arithmetic features and Auto text features of WORD.

  In the logicworks/designworks simulation logic library

In the Logicworks/Designworks Simulation Logic library, there is a module called Counter-4 UP w/o EN which counts the sequence 0000, 0001, 0010, ... , 1110, 1111, 0000, 0001, ... . Create a continuous mod 10 counter using the 'Counter-4' module..

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