For this lab activity, the HousingCrunch activity in part 1 will be modified to load housing data from a CSV file instead of having the options manually added to the houseList (also known has hardcoded values). In addition to prompting the user for name and a seed value, the program should also prompt for the filename containing the housing data. The data file will contain more data fields than will be used in this application as we are only interested in the housing data stored in the 1st field of each row. The screenshot below shows a spreadsheet view of the provided CSV data with the first field of each row outlined in red.

MASH Database Spreadsheet

It will be extremely helpful to review the CSVParser Deeper Look Video and Guided Experimentation examples before starting on this activity.

NOTE: In Computer Science we teach students to begin counting at zero because zero is the first index value of arrays, strings and many other programming related things. When working with data from muggles (non-programmer folk), the first data element is often referred to as record 1 or row 1 or column A or field 1. Just open a spreadsheet and look at the column and row identifiers. As programmers it is our responsibility to be aware of this difference and make certain our programs behave correctly.

Expected Program Output (with sample user input)
Please enter your name: Luke
Please enter a seed value: 123
Please enter the filename: MASHDatabase.csv

Hello Luke,
You should buy a shack.

Answers

Answer 1

To modify the HousingCrunch program, prompt the user for their name, a seed value, and the filename containing the housing data in CSV format.

How  is this so?

Load the housing data from the CSV file, extracting only the first field of each row.

Use the user's name, seed value, and the housing data to determine their recommended house option.

Finally, print the personalized recommendation to the console.

Note that CSV format, short for Comma-Separated Values format, is a plain text file format used to store tabular data.

Learn more about program at:

https://brainly.com/question/30783869

#SPJ1


Related Questions

In Java Please

4.24 LAB: Print string in reverse
Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending when the user enters "Done", "done", or "d" for the line of text.

Ex: If the input is:

Hello there
Hey
done
the output is:

ereht olleH
yeH

Answers

The program that takes in a line of text as input, and outputs that line of text in reverse is given

The Program

import java.util.Scanner;

public class ReverseString {

  public static void main(String[] args) {

       Scanner input = new Scanner(System.in);

       String line;

       do {

           line = input.nextLine();

           if (!line.equalsIgnoreCase("done") && !line.equalsIgnoreCase("d")) {

               String reversed = reverseString(line);

              System.out.println(reversed);

           }

       } while (!line.equalsIgnoreCase("done") && !line.equalsIgnoreCase("d"));

   }

  public static String reverseString(String text) {

       StringBuilder reversedText = new StringBuilder();

       for (int i = text.length() - 1; i >= 0; i--) {

           reversedText.append(text.charAt(i));

       }

       return reversedText.toString();

   }

}


Read more about programs here:

https://brainly.com/question/30783869

#SPJ1

Other Questions
Evaluate the indefinite integrals using Substitution. (use C for the constant of integration.) a) 3x^2(x^39)^8dx= Dynamo Electronics Inc produces and sells various types of surge protectors. For one specifc division of their manufacturing, they have a total cost for producing x units of C(x)=81x+99,000 and a total revenue of R(x)=191x. How many surge protectors must Dynamo produce and sell to break-even? surge protectors (round to the nearest whole number) How much cost will Dynamo incur at their break-even point? $ (round to two decimal places if necessary) Create a child classe of PhoneCall as per the following description: - The class name is QutgoingPhoneCall - It includes an additional int field that holds the time of the call-in minutes - A constructor that requires both a phone number and the time. It passes the phone number to the super class constructor and assigns the price the result of multiplying 0.04 by the minutes value - A getinfo method that overrides the one that is in the super class. It displays the details of the call, including the phone number, the rate per minute, the number of minutes, and the total price knowing that the price is 0.04 per minute Part II. Game Theory (25 points) Due to the COVID pandemic, there is urgent need for a medical product that only two firms have the capabilities to produce. It is understood that this is a "one shot game" in that once the initial need is filed, there will be no further need for this product. Assume that the two firms are current "colluding together" to set price so to maximize the industry profit. At this collusive price, the industry profit is $400 million - and that profit is split evenly between the two firms. Assume also that if one firm were to cut their price, then the industry profit would fall to $300 million, but the firm that cut the price would take 75% of the market. Finally, if both firms cut their price the industry profit would fall to $200 million and that profit would be split evenly. (a) Is game theory is an appropriate tool for analyzing this competitive situation? If so, why? (b) Would you recommend that a firm cut its price or hold to the current price? Explain your argument - using Game Theory Cut Price or Hold Price (Circle One) (c) How, if at all, does this relate to the notion of a "prisoner's dilemma"? Find the slope -intercept form of the equation of the line that passes through (-7,5) and is parallel to y+1=9(x-125) what is the standard deviation of the followng sample: average of 100 independent normal random variables each with a population standard deviation of 3? Assume you have a poker chip set containing blue, red, and white chips, all of the same size. This time, you place 18 blue chips, 23 red chips, and 9 white chips in a bag. Using the Law of Large Numbers, what is the probability of selecting a red chip from the bag? rank the following in order of decreasing and energy of light absorbed. a: [cr(en)3]3 b: [cr(cn)6]3 c: [crcl6]3 a) Find the equation of the line passing through the points (10,4) and (1,8). Answer: f(x)= (b) Find the equation of the line with slope 4 that passes through the point (4,8). Answer: f(x)= Task 2 - Weightage 15% - Write a Formal email: Effective workplace writing is a critical skill to develop and one that you will be using on a daily basis as an IT professional. Developing these skills will be important in creating a good first impression and maintaining your professional reputation with internal and external stakeholders. Scenario: You are a Talent Acquisition specialist of a successful Global Talent recruitment firm. A month ago, you were asked to send a potential Director Level candidate, one of your client's role and job description for their interest. You did this but you have not received a response from them. Write a follow up email to this candidate. In your email you must: - Remind the candidate of the original email you sent to them. - Explain the benefits of joining your client company. - Request a response from them. Prepare an appropriate follow up email to this senior candidate. Remember the time schedule and seniority of their position. Special attention should be paid to clarity of the information, structure, grammar, and professionalism. Prepare entries to record the following non-strategic investment transactions of Arrowhead investment Corporation. (If no entry is required for a transaction/event, select "No journal entry required" in the first account field. Do not round intermediate calculations. Round your final answer to the nearest whole dollar amount.) 2020 Mar. I Paid $64,980 to purchase a $64,000, two-year, 9.0% bond payable of Action Corporation dated March 1 , Interest is paid quarterly beginning June 1. Management intends to actively trade bond purchases. Apr. 16 Bought 2,200 common shares of Brandon Motors at $27,50. May 2 Paid $42,968 to purchase a five-year, 6.50 s,$44,000 bond payable of Collingwood Corporation. Interest is paid annually each April 30 . June 1 Received a cheque from Action Corporation regarding quarterly interest. Aug. I Brandon Motors' board of directors declared a dividend of $0.75 pst share to shareholders of record on August 10, payable August 15 . 15 Received the Brandon Motors dividend. Sept. I Received a cheque fron Action Carporation regarding quarterly interest. 17 Purchased 25,400 Dauphin Inc. common shares at $3.60. 0ct. 20 Sold the Brandon Motors shares at $31.40. Dec. 1. Received a cheque from Action Corporation regarding quarterly interest. 1. Sold the Action Corporation bond at 101 . 41 Accrued Interest on the Collingrood bond. The fair value of the equity necurity on this date was Dauphin. 53.90. The carrying value equalled the fair value fur the Collingwood bond. Apr. 30 pecelved a cheque from collingwood corporation regarding annual interest. Food processing and packaging together account for a little over 25% or ______ quads of the energy consumed in the food system annually. Farmland County Bank offers to lend money to Gino, the owner of Home Hardware Store, at 15 percent interest. Before Gino accepts, a state statute is enacted prohibiting loans at rates greater than 12 percent. Gino and the bank havea. a contract for a loan at 15 percent interest.b. a contract for a loan at 12 percent interest.c. a contract for a loan at 0 percent interest.d. no contract for a loan. A silo has a diameter of 18 feet and the height of the cylinder is 42 feet. The hight of the cone adds and additional 8 feet. Find the total volume of 1 silo. Show all work If a breach relates to a fundamental term of the contract, it is called a total breach and the nonbreaching party is entitled to either: _______ or _______. (Choose two correct answers) For a particular reaction, the standard entropy change is 531J/K and the standard enthalpy change is 322 kJ. At what temperaturewill this reaction become spontaneous? What two things did the Black Codes try to accomplish?They limited where freedmen could go.They protected the rights of formerly enslaved people.They established schools for Black children.They restricted who could own property or a business. Calculate the indicated Riemann sum S. for the function f(x) = 20-2x2. Partition [-1,9] into five subintervals of equal length, and for each subinterval [X-1.X]. let k = (xx-1+xk) /2. Question 3 Aupa Mutumbula qualified as a accounted in June 2014, and 1 July 2014 began a new auditing and accounting work by investing N$20000 in cash and accounting books with a N\$ 4000 fair value that he had used at university. The practice trades under the name Ouatjiri AM Accounted. The following transactions relate to July: 1 Rent the furnished office of accounted who was retiring, paying N\$ 9000 cash for six month rent in advance. Purchased office supplies for cash N\$ 250 Bought the accounting package of the retiring accounted for N$20000, paying N\$ 5000 cash and agreeing to pay the balance within six months. The system has a useful life of ten years after which they will have no value. 5 Completed legal work for a client and immediately collected N\$ 500 in cash for the work done 7 Purchased additional office supplies on credit N\$ 400. 10 Completed accounting work for client on credit N\$ 6000. 15 Paid cleaning service to clean the office for the month N$750 15 Paid for repairs and painting of the office, N$1250 16 Paid the salary of the part-time legal adviser N $3000. 17 Paid for the office supplies purchased on 7 July. 18 Completed accounting service for aq client on credit, N$4000 20 Received payment in full for the accounting work completed on 10 July 22 Completed additional legal work for the same client on credit, NS 3500 . 27 Received payment in full for the accounting service completed on 18 July. 31 Paid the July telephone bill, N\$ 250 Paid the July electricity and water account, N\$ 200.Paid the office secretary salary, N$3000 Recognised rent and depreciation expense and supplies used of N\$ Required a) Arrange the following asset, liability and owners' equity headings on accounting equation worksheet: Bank, Account receivable, Rent paid in advance, Office supplies, Accounting system, Account payable, Capital, Income and Expense's, and show the effects of the transactions on theelements of the equation by recording increase and decrease in the appropriate columns. b) Prepare a statement of profit or loss for Ouatjiri AM Accounted for the period ended 31 July 2014. c) Prepare a statement of financial position for Ouatjiri AM Accounted as at 31 Marc 2014. The accounting equation is Assets=capital +liabilities When Alphonse died his wife Antonia applied for the $200,000 death benefit under his whole life non-participating policy as she was named as beneficiary under the contract. Unknown to Antonia Alphonse had collaterally assigned $45,000 of the death benefit and the $22,000 cash surrender value to the bank as security for a business loan he had taken out the previous year. The loan was still outstanding when Alphonse died and the assignment had been registered with the insurance company. What would the insurance company have paid under the death claim and to whom? a) \$67,000 would have been paid to the bank and $133,000 to Antonia. b) $45,000 would have been paid to the bank and $155,000 to Antonia. c) The $200,000 would have been paid to the bank and Antonia jointly, for them to sort out. d) he entire $200,000 would have been paid to the bank. Antonia would have to claim against the bank for her share. Alex is a member of a contributory, best-earnings, defined-benefit plan. For 2019, Alex's contributory earnings were $63,110 and the YMPE was $57,400. The first contribution rate on amounts to the YMPE is 5% and the second contribution rate is 9% on amounts above YMPE. How much is Alex required to contribute to the plan? a) $3,383,90 b) $3,669.40 C) $8,036,00 d) $8,835.40