Develop a java program that records house prices

Assignment Help Programming Languages
Reference no: EM131620361

Programming Assignment -

Overview - This is an individual assignment that requires you to design, develop and test a small procedural Java program.

Learning Outcomes Assessed

The following course learning outcomes are assessed by completing this assessment:

  • Identify and use the correct syntax of a common programming language
  • Recall and use typical programming constructs to design and implement simple software solutions
  • Reproduce and adapt commonly used basic algorithms
  • Utilise pseudocode and/or algorithms as a major program design technique
  • Write and implement a solution algorithm using basic programming constructs
  • Demonstrate debugging and testing skills whilst writing code
  • Develop self-reliance and judgement in adapting algorithms to diverse contexts
  • Design and write program solutions to identified problems using accepted design constructs

Assessment Details

Housing affordability for first home owners has been discussed recently in the Australian media. It became a headline discussion when one commentator made the remark that young people could afford to save for a deposit if they stopped buying avocado on toast and takeaway coffees.

Your employer wants you to develop a small Java program that allows users to enter the cost to purchase properties in the user's area, then calculates how many purchases of avocado on toast would be required to save a 20% deposit to purchase those properties. For example, if a house in a particular area cost $400,000 to purchase, a 20% deposit amounts to $80,000. This equates to 4000 purchases of avocado on toast at $20 per serve.

Stage 1: Design

This stage requires you to prepare documentation that describes the function of the program and how it is to be tested. There is no coding or code testing involved in this stage. A document template has been provided for your use.

Requirements:

1) Read through Stage 2: Program Development to obtain details of the requirements of this program.

2) Write an algorithm, pseudocode or draw a flowchart that describes how the program will operate.

a. All program requirements - base, standard and advanced - must be included, even if you do not end up including all these requirements in your program code.

b. The algorithm, pseudocode or flowchart must be structured logically so that the program would function correctly.

This documentation is aimed at helping you think clearly about how your program must work, so you understand the logic of the program before you attempt to code it. Spending time on this documentation before you begin coding will make it much easier for you to develop your program.

3) Prepare and document test cases that can be used to check that the program works correctly, once it has been coded. You do NOT need to actually run the test cases in this stage; testing will occur in Stage 3: Testing.

a. All program requirements - base, standard and advanced, must be included, even if you do not end up including all these requirements in your program code.

b. Make sure the test cases include checking of data entered by the user to make sure that only valid data is accepted. If the user enters invalid data, the user should be informed of this and given another chance to enter the data. NB: As we have not covered exception handling, you may assume that the user will always enter integer values. This includes entering prices in whole amounts of dollars, ignoring the cents.

c. Test cases should be documented using a template like the one below. You may include extra information if you wish. At this stage, the Actual Result column will be left blank.

Stage 2: Program Development

Using your Design Documentation to assist you, develop a Java program that records house prices for an area then compares the deposit required to purchase these with the cost of purchasing avocado on toast, implementing the requirements outlined in this section. These requirements have been broken into three groups:

  • Base Functionality includes the minimal level of requirements to achieve the essential components of this assignment. This group of requirements focuses on getting the code to work and on using the programming constructs we cover in class. You can expect to use constants, variables, loops, conditional statements and arithmetic operators for these requirements and you should look for opportunities to use these wherever you can. You will not receive full marks for implementing a requirement, even if it works, if you have not used the appropriate programming construct to do so.

At this level, you can decide if it is easier for you to code everything within a single method initially, or to modularize it straight away.

  • Standard Functionality ensures the code is modularized, and that method calls are used to ensure the program flows correctly. It allows data to pass from one method to another as parameters.
  • Advanced Functionality provides a challenge task, and is best left until all the other requirements have been addressed. It requires using the Java API to investigate and implement appropriate methods of the GregorianCalendar class.

You are expected to follow coding conventions, such as proper layout of code, using naming conventions and writing meaningful comments throughout your program.

An example of the program running is included in the Appendix for your reference.

Base Functionality:

1. Display a welcome message when the program starts

2. Provide a menu from which the user can select Enter House Prices, Enter Avocado on Toast Price, Deposit Calculator or Exit System. This menu should be repeated each time after the user has chosen and completed an option until the user chooses to Exit System. The user selects an option by entering the number listed next to it. If an invalid number is selected, the user is advised and shown the menu again to make another selection.

3. When the user selects the Enter House Prices option, prompt the user to enter the house prices for the area. The user should be prompted three times, first for the cheapest house listing, second for the chosen house listing, and third for the median house listing. After each prompt, the system reads and saves a positive, whole number value from the user before proceeding. The system should also ensure that the value provided for the cheapest house is the cheapest of all three options entered. When all three values have been entered, the menu is redisplayed.

4. When the user selects Enter Avocado on Toast Price, prompt the user to enter the price to purchase Avocado on Toast from a local café or restaurant. This should be a positive, whole number value only. Once the user has entered this value, save it for later access and redisplay the menu.

5. When the user selects Deposit Calculator, display a calculation of how many smashed avocados on toast the user will need to not buy in order to save the deposit for each of the three house prices specified. This uses the data provided in Steps 3 and 4.

a. The amount of the deposit is a flat 20% of the overall price of each property.

b. The number of avocados required may not be a whole number and should be displayed with 2 decimal places. You can obtain the number of avocados on toast required by dividing the amount of the deposit by the price of a single avocado on toast.

c. The deposit required should be displayed to 2 decimal places.

d. After displaying the calculations, the menu should be redisplayed.

6. When the user selects Exit System, quit the program with a message to the user.

Standard Functionality:

7. Modularize the code, correctly using method calls and passing data between methods as parameters.

8. Ensure the code complies with coding standards. This includes:

a. Commenting the code so that it is clear what the code is doing and anything potentially unclear to future developers is explained. Hint: A well-documented algorithm / pseudocode / flowchart is an excellent starting point for this.

b. Replace any "magic numbers" with constants or variables, as appropriate. All values that have consistent values throughout the program should be stored as constants.

c. Indent the code and include white space as required to improve its readability.

d. Ensure all variables and constants have clear names that reflect their purpose.

Advanced Functionality:

9. Enhance the Deposit Calculator to provide a date by which the deposit would be saved for the chosen house, based on a user-specified number of avocado on toast purchases per week.

a. Use the GregorianCalendar class to manage your dates. You will need to import java.util.GregorianCalendar to use this library.

b. Prompt the user to enter the number of times per week they purchase avocado on toast.

The user must enter a positive whole number - not 0 - before the program will proceed.

c. Display a message to the user to advise when the house deposit would be accumulated by saving the money it would take to purchase the avocado on toast.

i. Base the deposit on the value of the user's chosen house

ii. Use the date the user runs the program as the starting date

iii. Provide your calculation in whole weeks only. You do not need to determine the exact day a deposit would be saved, only the week it would be available.

d. Redisplay the menu after the calculation has been displayed.

Stage 3: Testing

Using a copy of the test cases developed in Stage 1: Design, test the program you have developed in Stage 2: Program Development. Document your results, including both failed and successful tests.

Note: Please do not leave out any failed tests. If your testing highlights that your program has not worked correctly, then the failed tests help to demonstrate that you have been testing your program properly.

To show that you have tested your program, include small (but readable) screen captures in your Actual Results as well as any explanatory comments. Microsoft Windows includes a Snipping Tool that is useful for taking captures of the relevant parts of the screen.

You may test your program in phases if you wish. Stage 2: Program Development provides three separate groups of functionality in the requirements, working from the minimal level of requirements through to more advanced concepts. Each of these groups can be tested individually.

Base Functionality:

This phase requires you to check that the base functions (displaying welcome message when the program starts, showing a menu of options until the user chooses to exit, entering house price details for the three pricing levels, entering the cost of purchasing avocado on toast, displaying the deposit calculation and exiting the system) have been implemented.

Standard Functionality:

This section does not include any functionality beyond that of the base functionality, however if you needed to make changes to your code to implement modularization and coding standards, testing is required to ensure that the code still works properly once these changes have been made. Small changes made to code can quite often result in bugs so retesting is important to confirm the correct behaviour has been retained.

Attachment:- Assignment File.rar

Reference no: EM131620361

Questions Cloud

Identify and define determinants of health for an individual : Identify and define determinants of health for an individual or family population at risk including social, environmental and global factors as applicable.
Review the problem related to the vehicles : Vehicles pass through a toll gate at a rate of 90 per hour. The average time to pass through the gate is 36 seconds.
Setting of a suburban kitchen : The Nixon-Khrushchev debates held in the setting of a suburban kitchen illustrated how freedom in America had come to mean economic abundance and consumer.
Explain at least two key factors policy makers use : Explain at least two key factors policy makers use when evaluating and using information provided to them in policy reports.
Develop a java program that records house prices : ITECH1000 Programming Assignment. develop a Java program that records house prices for an area then compares the deposit required
Perceptions evolved regarding the role of united states : Analyze how the American peoples' perceptions evolved regarding the role of United States in relation to the rest of the world.
Differing viewpoints over the new deal : Be sure to include an examination of the expansion and retraction of freedoms and the differing viewpoints over the New Deal.
Define the concept of the exponential distribution : There are two workers who are responsible for 10 milling machines. The machines run on the average for 20 minutes, then require an average 5-minute service.
Describe the general benefit to the community : Briefly explain where you are doing this. It should be very specific. Senior Citizen Center in Monroe Co on Saturday. Local church- name, malls, fair etc.

Reviews

len1620361

8/31/2017 1:08:28 AM

Your program code and all documentation should be zipped into a single file and loaded into the Assignment Box provided in Moodle by the due date and time. IMPORTANT NOTE: Make sure that you submit the source code (.java files) NOT the compiled program (.class files). Your work will NOT be marked if the .java files are not provided.

len1620361

8/31/2017 1:08:21 AM

Stage 1: Design Documentation- Development of an algorithm, pseudocode or flowchart describing how the program should function. All requirements from the Assessment Details section included, Logical structure, Documented test cases to validate program, All requirements from the Assessment Details section included and Data is validated to ensure user entries are appropriate and incorrect user entries are handled smoothly.

len1620361

8/31/2017 1:08:13 AM

Stage 2: Program Development-A Java program addressing the requirements outlined in the Assignment Details section, including appropriate use of loops, conditional statements, constants and variables: Base Functionality: Display of a welcome message when the program starts, Menu displayed until user chooses to exit, Enter House Prices to enter and record sample house prices. Stage 3: Testing - Documented test results clearly showing all the testing that has been conducted and the results of this testing. Failed tests do NOT result in a loss of marks. Test cases for all base functionality attempted and results documented. Test cases for all standard functionality attempted and results documented. Test cases for all advanced functionality attempted and results documented.

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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