Suppose we have a text file named persons.txt containing information about a collection of persons. A...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Suppose we have a text file named persons.txt containing information about a collection of persons. A sample of the data is shown below: PO1; Jane Smith; drawing, playing piano; Melbourne PO2; Tom Brown; gardening; Sydney PO3; Bob Carter; drinking, dancing, running; Sydney PO4; Frank Dawson; playing electronic games, soccer; Melbourne A line contains the following details about a person: the person's id, name, hobbies (separated by commas), and city of residence. Write a program that reads the text file and displays on the screen the persons' details as shown in the sample below: PO1 Jane Smith Melbourne 2 PO2 Tom Brown Sydney 1 PO3 Bob Carter Sydney 3 PO4 Frank Dawson Melbourne 2 That is, for each person, the method displays The id and the name on the first line, The city of residence on the second line, and The number of hobbies on the third line. Suppose we have a text file named persons.txt containing information about a collection of persons. A sample of the data is shown below: PO1; Jane Smith; drawing, playing piano; Melbourne PO2; Tom Brown; gardening; Sydney PO3; Bob Carter; drinking, dancing, running; Sydney PO4; Frank Dawson; playing electronic games, soccer; Melbourne A line contains the following details about a person: the person's id, name, hobbies (separated by commas), and city of residence. Write a program that reads the text file and displays on the screen the persons' details as shown in the sample below: PO1 Jane Smith Melbourne 2 PO2 Tom Brown Sydney 1 PO3 Bob Carter Sydney 3 PO4 Frank Dawson Melbourne 2 That is, for each person, the method displays The id and the name on the first line, The city of residence on the second line, and The number of hobbies on the third line.
Expert Answer:
Answer rating: 100% (QA)
Since the question does not specify the use of a specific programming l... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Consider groundwater flow between two parallel rivers from our lectures. The distance between the rivers (L) is 2,000 feet and aquifer is 60 feet thick (H=60 ft). The hydraulic conductivity is k=1...
-
The MBA program at Westmore University has undergone several dramatic changes over the past five years. During this time, the goal of the business school was to recruit as many students as possible...
-
Corporations with international operations need to assess the risks associated with setting up and maintaining operations in different regions of the world. Consideration of the risks include...
-
A business wishes to have $80,000 ten years from now to make a down payment on a capital asset. How much money would the business need to invest in equal annual payments at a compound interest rate...
-
A Global Positioning System (GPS) satellite is in a circular orbit 10,900 mi above the surface of the earth. Knowing that the radius of the earth is 3960 mi, determine the time of one orbit of the...
-
What is the output from the following? >>> a = 3 >>> b = 4 >>> x = a * b >>> print x
-
A researcher hypothesizes that drivers who use cellular phones will get into a greater number of traffic accidents than drivers who do not use these phones. For this example, a. What are the...
-
One year ago, your company purchased a machine used in manufacturing for $110,000. You have learned that a new machine is available that offers many advantages; you can purchase it for $150,000...
-
Image transcription text Angle (0) Location (r) [m] 0 30 45 60 90 0.001 -2.4E+09 -1.2E+09 2.0E+04 1.2E+09 2.4E+09 0.1 -2.2E+01 -9.8E+00 2.5E+00 1.5E+01 2.7E+01 0.2 -1.0E+00 0.0E+00 1.0E+00 2.0E+00...
-
The beginning inventory of merchandise at Dunne Co. and data on purchases and sales for a three-month period ending June 30 are as follows: Instructions 1. Record the inventory, purchases, and cost...
-
The area of a hysteresis loop obtained from a ferromagnetic specimen is 12.5 cm. The scales used were: horizontal axis 1 cm-500 A/m; vertical axis 1 cm=0.2 T. Determine (a) the hysteresis loss per m...
-
The factory overhead budget for the period includes all production-related costs other than direct labor and direct materials only indirect manufacturing costs that will be paid in cash total...
-
Financial Management Individual assignment Choose a company, put the name of your company in front of your name in here and make sure I approve before proceeding. The company must match ALL the...
-
Order processing time can be accelerated by using _______ (EDI) which facilitates a review of the customer's credit rating and whether goods are in stock, issuing an order to the warehouse, invoicing...
-
Cash Budget For the Year Ended December 31, 2013 Increase in Cash Decrease in Cash Total Cash receipts $9,172,846 Cash payments for materials $(5,338,660) Wages and commissions paid $(1,616,693)...
-
Greer Utsey earned $47,500 in 2022 for a company in Kentucky. Greer is single with one dependent under 17 and is paidweekly. The FUTA rate in Kentucky for 2022 is 0.6 percent on the first $7,000 of...
-
So, basically, I have to figure out the concentration ofacetylsalicylic acid in solution 50 mL sample. But, I'm unsure ofhow to calculate it. I know molarity is moles / L, and I know how to get...
-
Consider the reaction of acetic acid in water CH 3 CO 2 H(aq) + H 2 O(l) CH3CO 22 (aq) + H 3 O + (aq) where Ka 5 1.8 3 1025. a. Which two bases are competing for the proton? b. Which is the stronger...
-
Harold Conners (Social Security number 785-23-9873) lives at 13234 DeMilo Drive, Houston, TX 77052, and is self-employed for 2012. He estimates his required annual estimated tax payment for 2012 to...
-
Jason and Mary are married taxpayers in 2012. They are both under age 65 and in good health. For this tax year, they have a total of $41,000 in wages and $500 in interest income. Jason and Mary's...
-
Bea Jones (age 32) moved from Texas to Florida in December 2011. She lives at 654 Ocean Way, Gulfport, FL 33707. Bea's Social Security number is 466-78-7359 and she is single. Her earnings and income...
-
Explain why budgets are important to all organizations. Expand this discussion by illustrating how different types of budgets are used.
-
Compare and contrast licensure and credentialing.
-
Describe the steps in attaining state licensure for nurses.
Study smarter with the SolutionInn App