Starting Out With Visual C# (5th Edition)
Starting Out With Visual C# (5th Edition)
5th Edition
ISBN: 9780135183519
Author: Tony Gaddis
Publisher: PEARSON
bartleby

Videos

Textbook Question
Book Icon
Chapter 9, Problem 1PP

WEATHER DATA

In the student sample progr4n files for this chapter, you will find a text file named weather.txt. The file contains weather data for the month of January 2018. Each line in the file contains the following four pieces of data for one day:

  • Date
  • Precipitation
  • High temperature
  • Low temperature

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

Date;Precipitation;HighTemp;LoirTemp

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

1/1/2018; 0; 29; 10

The data stored in this line are:

  • Date = 1/1/2018
  • Precipitation = 0 inches
  • High temperature = 29
  • Low temperature = 10

Design a structure that has fields for the four pieces of data. In an application, read the file and store each day's data in an instance of the structure. The structure instances should be stored in a List.

Tip

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

The application should let the user select a date using a DateTimePicker control. The control should be configured so it only allows the user to select dates in January 2018. When the user selects a date, the application should display the weather data for that date.

Blurred answer
Students have asked these similar questions
solve and show the tree on paper
I need help to resolve the following activity
Modern life has been impacted immensely by computers. Computers have penetrated every aspect of oursociety, either for better or for worse. From supermarket scanners calculating our shopping transactionswhile keeping store inventory; robots that handle highly specialized tasks or even simple human tasks,computers do much more than just computing. But where did all this technology come from and whereis it heading? Does the future look promising or should we worry about computers taking over theworld? Or are they just a necessary evil? Provide three references with your answer.

Chapter 9 Solutions

Starting Out With Visual C# (5th Edition)

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
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
C - File I/O; Author: Tutorials Point (India) Ltd.;https://www.youtube.com/watch?v=cEfuwpbGi1k;License: Standard YouTube License, CC-BY
file handling functions in c | fprintf, fscanf, fread, fwrite |; Author: Education 4u;https://www.youtube.com/watch?v=aqeXS1bJihA;License: Standard Youtube License