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

  Subtyping and binary methods

This question is about the relationship between subtyping and inheritance. Recall that the main principle associated with subtyping is substitutivity: If A is asubtype of B, then wherever a B object is required in a program

  It should have an if statement

The following are hints given: It should have an if statement. This add method determines what number greater than or less than the other number, than it adds the positive or negative. I think this should be a private method.

  Develop an event based onetime password system

Develop an event based onetime password (OTP) system - A study of the collision property. Generate 1,000,000 OTPs using your application. Show a graph describing how the collision properties evolve as the number of OTPs increases.

  Provide java code to create and initialize array of integers

Provide a Java code to create and initialize an array of integers (Java primitive int), floats or any other Java primitive type of your choice

  Part - a1nbsp to compile and run a java source file

part - a1.nbsp to compile and run a java source file hello.java that contains a main method which of the following are

  Difference between sequential access and random access

What is the difference between sequential access and random access? What are BufferedInput/OutputStreams and why are they used? Write some Java code to illustrate how to create a BufferedInputStream

  Writing a java program that provides simple statistics

You will be writing a Java program that provides simple statistics about the input data. The method stubs are given below. This assignment will give you experience with methods

  Explain how to handle exceptions within a program

Continuing our discussion of exceptions we will work to understand various debugging and exception handling techniques. Please respond to all of the following prompts: -- Explain how to handle exceptions within a program, and provide an example using..

  How can worms and viruses be introduced to a web site

Include ways that a Website can be attacked by malicious users such as Java script insertion, SQL insertion, hidden field manipulation, header manipulation and cookies

  Determine and print the weekly rate.

Write the Java Statements that retrieve the age of the child and the number of days the child will be at the day care center.

  Write a program that keeps track of the balance

Write a program that keeps track of the balance of a savings account. The program starts by reading the initial amount (starting value) of the savings account. It then allows the account holder to perform withdrawal, deposit and check balance proc..

  Example of overloading

Implement in different classes and that have the same number and type of parameters - Inheritance models the IS-A relationship, in which the objects of the subclass are also objects of the superclass - Different classes and that have the same number ..

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