Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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.

Java, Programming

  • Category:- Java
  • Reference No.:- M92025206
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Java

Solving 2nd degree equationsbull write the following java

Solving 2nd degree equations • Write the following Java methods • boolean real-sols(double a, double b, double c): it returns true if the 2nd degree equation ax2 + bx + c has real solutions • double solution1(double a, d ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Operating systems assignment -problem 1 sharing the bridgea

Operating Systems Assignment - Problem 1: Sharing the Bridge A new single lane bridge is constructed to connect the North Island of New Zealand to the South Island of New Zealand. Farmers from each island use the bridge ...

Assessment instructionsin this assessment you will design

Assessment Instructions In this assessment, you will design and code a simple Java application that defines a class, instantiate the class into a number of objects, and prints out the attributes of these objects in a spe ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

Assessment instructionsin this assessment you will complete

Assessment Instructions In this assessment, you will complete the programming of two Java class methods in a console application that registers students for courses in a term of study. The application is written using th ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

Can someone help me please with those question1what is the

Can someone help me please with those question 1:what is the best data type for student id datatime,currency,number,decimal 2:which relationshipis preferable? one to one,one to many,many to many 3:if you add table A's pr ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As