Calculate the total value of property for sale

Assignment Help JAVA Programming
Reference no: EM131270476

Application 1:

Write an application in JAVA that reads from a text file called: listings.txt, analyzes the property listed per agent, and outputs a report to an text file called: agentreport.txt file. The application should do the following:

1. Prompt the user for the name of the input file (listings.txt).

2. Open listings.txt file and read in property listings.

3. Store each property type into a Set.

a. Convert property type to upper case before adding to the Set using method(s) from String class.

b. Sort the Set of property types alphabetically.

4. Use a Map to calculate total property listed in dollars and cents for each agent id.

Note: Agent id would be the key, and accumulated total of property listed would be the value.

• Sort your Map by agent id.

• Create an agentreport.txt file.

5. Use an Iterator to iterate through the Set and write a sorted set of property types sold by the agents to the agentreport.txt file.

6. Iterate through your Map to write your sorted pair of agent id and total property listed to the agentreport.txt file.

Application 2:

Write an application in JAVA that reads the text file: listings.txt, analyzes the properties listed, and outputs an overview of properties listed to an overview.txt file. Your application should do the following:

1. Prompt the user for the name of the input file (listings.txt).

2. Open the listings.txt file and read in property listing information using a buffered FileReader.

3. Count the total number of property listings for sale.

• Use buffered FileWriter to write the count of the number of property listings to your overview.txt file.

4. Calculate the total value of property for sale.

• Use a buffered FileWriter to write the total value of properties currently for sale.

5. Store each property id into an ArrayList.

a. Sort the ArrayList of property ids using natural ordering.

b. Use a for-each loop to iterate through the sorted ArrayList and write property ids to overview.txt file using buffered FileWriter.

6. Use buffered FileWriter to write the total value of the properties listed and the total number of properties currently for sale.

Note: All code needs to be commented well using single line and/or multi line comments, and explainging program flow and logic in terms easily understandable by a begginer programmer.

Reference no: EM131270476

Questions Cloud

Total expenditure on beef after the price change : The price of all other goods remains constant while the price of beef increases by 4%. You respond by reducing your demand for beef by 2%. Is your demand for beef elastic or inelastic? What happens to your total expenditure on beef after the price..
Explain how you would go about dating this site : Burial number one has some beautiful obsidian tools, some ceramic pots with food remains in them and some textiles. Burial number two has intact ceramic pots with beautiful decorations. Explain how you would go about dating this site and some of..
What is the reason for selecting your strategy : What are the two Aimsyou would select for improving process above? Explain your aims.- What is the reason for selecting your strategy?
Quantity for the single price monopolist : Given the above information, what is the profit maximizing price and quantity for the single price monopolist? You should round your answers to the nearest whole number.
Calculate the total value of property for sale : Prompt the user for the name of the input file (listings.txt). Open the listings.txt file and read in property listing information using a buffered FileReader. Calculate the total value of property for sale.
Documents periodically to ensure the desired needs : A young woman lies unconscious in a hospital, on life support for 6 weeks. The family is told she will not improve, and has no brain activity. Her husband wants to suspend life support, and claims he is sure that is what his wife would want. How impo..
What are the approximate high and low logic levels : While walking down a dark alley, Ben Bitdiddle encounters a twoinput gate with the transfer function shown in Figure 1.48. The inputs are A and B and the output is Y.
Product in a competitive market at a price : A firm is selling a product in a competitive market at a price of $50 per unit. Using the information below regarding cost, what are the firm's profits?
Calculate single price monopolist profit : a. Given the above information, what is this monopolist's profit maximizing price and output if it charges a single price? b. Given the above information, calculate this single price monopolist's profit. c. At the profit maximizing quantity, what is ..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Describe the applications functionality

Create an application for Koch's Cottages, a weekend getaway resort that rents cottages and boats to use on the local lake - Add labels as suitable to describe the application's functionality. Save the file as JCottageFrame.java.

  Handling the unexpected in life

100-300 Words. We often are handling the unexpected in life.  Kids and pets can offer many of these unexpected occurrences. Where do you see life's every day exception and how would the programming look for those?  Humor is appreciated.

  Creates an array of six divsales objects

Write a program that creates an array of six DivSales objects. The program should ask the user to enter the sales for four quarters for each division.

  Given an array with 100,000 entries to sort

Sorting  given an array with 100,000 entries to sort. Under what circumstances would you use each of the following: insertion sort,mergesort'quicksort

  Explain how you would minimize the errors

What are the three types of errors that you can encounter in a Java program? Describe them, and explain how you would minimize the errors

  What are the events and event handling

What are the Events and Event Handling? Please explain the ActionListener and the actionPerformed methods with am example

  Text file containing the data

This program should begin by asking the user for the name of a text file containing the data. Then read the data which will be a line containing the dimensions of a 2 dimensional array followed by a 2 dimensional array of ints. Then perform variou..

  Write a gui program that maintains a set of contacts

Write a GUI program that maintains a set of contacts. Each contact has name, address, and a list of phone numbers. This contacts should be be stored in a HashMap

  Design a java application that will read a file containing

Design a Java application that will read a file containing data

  1 securityimplement security so that all users can view the

1. security.implement security so that all users can view the information about the projects but only authenticated

  Problem aa savings account object holds a nonnegative

problem aa savings account object holds a nonnegative balance and provides depositk and withdrawk methods where

  Implement a class student

Implement a class Student. For the purpose of this exercise, a student has a name and a total quiz score. Supply a suitable constructor and methods getName( ), addQuiz(int score), getTotalScore( ), and getAverageScore ( ).

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