Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question

"In the student sample program files for this chapter, you will find a text file named house_prices.csv. The file contains the following data about houses for sale in a city:

  • Price

  • Number of bedrooms

  • Number of bathrooms

  • Square feet of living space

The data stored in each line is formatted in the following way:

Price,Bedrooms,Bathrooms,SquareFeet

Notice that the data items are separated by commas. The first line in the file looks like this:

221900,3,1,1180

The data stored in this line is:

  • Price = $221,900

  • Bedrooms = 3

  • Bathrooms = 1

  • Square feet = 1,180

Design a class that has properties for the four pieces of data. In an application, read the file and store each house’s data in an instance of the class. The class instances should be stored in a List.

The application should let the user search the List for the prices of houses with the number of bedrooms within a range, the number of bathrooms within a range, and the square feet of living space within a range. For example, all houses with two to four bedrooms, two to three bathrooms, and 1,500–2,500 square feet of living space. The application should display the data for each house that matches the search criteria in a ListBox.

Here are some tips:

  • Use the Split method that we discussed in Chapter 8 to tokenize each line of the file into the four pieces of data.

  • Use the FindAll method discussed earlier in this chapter to search the List."

This is a homework problem that has to deal with reading a CSV file into a ListBox. I have spent a lot of time on this with no success. Some help would be greatly appreciated.

Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education