In 0.3, you manually told the First Day application whether it was raining. In 0.5, you will use information from the Web before making that same decision.
You will enter a location, construct a weather request from that input, inspect the request URL, receive weather information from a server, and display a weather image. You will then use your own judgment to decide whether the image shows evidence of rain and set the existing It is raining checkbox yourself.
Most networking code is provided. Your focus is the path the information follows: user input → URL → request → response → displayed information → human interpretation → existing Boolean decision.
User Story
As a student preparing for the first day of class, I want to view weather information for a location and use my observation in the clothing decision so that I can see how information from the Web can influence an application.
Acceptance Criteria
Begin from a copy of your completed 0.4 First Day solution
Preserve the existing 0.3 clothing decision and 0.4 shopping-list persistence
Add the supplied weather location, request, and image controls
Construct a weather request from learner-supplied location text
Identify the scheme, host, path, and query parameter in the constructed request URL
Use a breakpoint to inspect the URL before the request is sent
Display the returned weather text and weather image using supplied code
Interpret the weather information yourself and manually set the existing rain checkbox
Reuse the existing clothing decision and verify its Boolean state with a breakpoint
Submit the zipped solution through the Feedback System and submit the Feedback System URL to Canvas
The Application Does Not Interpret the Weather Yet
The Web provides information. In this assignment, you decide whether the displayed information shows evidence of rain. The application still receives the final rain/no-rain value from the same checkbox you used in 0.3.
1. Back Up and Open Your Existing First Day Solution
Your First Day solution was renamed to your last name in 0.2. Keep that working name for the rest of the sequence. At the beginning of each module, make a backup of the completed previous checkpoint, then continue working in the original student-named solution.
Step 1 — Make a checkpoint backup
One Working Name
The backup identifies the completed checkpoint. The working solution remains named for you, so later First Day assignments continue in the same project without repeatedly renaming the solution.
Step 2 — Verify the previous checkpoint
Build or run the solution before making the new 0.5 changes
Verify the major behavior you completed in 0.4 is still present
If the previous checkpoint is not working, correct that starting state before adding the new module work
Module 0.5 revisits UML activity diagrams. This time, activity partitions show which participant is responsible for each action.
Step 1 — Read the request/response flow
The student starts the request, the First Day application constructs it, and the weather server returns information. The application can display the response, but the human still decides what the weather information means.
A web interaction crosses responsibilities: student input, application request construction, server response, and application display.
Step 2 — Identify the participants
Identify the action performed by the student
Identify the actions performed by the First Day application
Identify the actions performed by the weather server
Notice that the response travels back to the application before the student interprets it
Client and Server
For this walkthrough, the First Day application is acting as a client. It creates a request for a resource hosted by another system. That other system returns a response.
Replace the current shopping-list StackPanel with the slightly shorter version below. The behavior stays the same; this only creates space for the new section.
MainWindow.xaml — replace the 0.4 shopping-list StackPanel
Add it to the FirstDayScenario project as an existing item
Do not edit the helper
Built-In Service Fallback
The helper uses the live weather service when it is available. If the service cannot be reached, it supplies one of several bundled course weather images and clearly labels the result as a sample. You do not need to troubleshoot or understand the fallback implementation.
Set a breakpoint on the line that calls WeatherSupport.Load
Run the application and enter Wausau WI
Click Load Weather
Inspect weatherRequestUrl
Identify the scheme, host, location path, and format=3 query parameter
Inspect the URL before the helper obtains the live response or selects an offline course sample.Go to top
5. Request and Display the Weather Information
The supplied helper uses the URLs you constructed. Live information is displayed when the service responds. A clearly labeled course sample is displayed when it does not.
Step 1 — Keep the displayed image available for later use
Add these fields inside MainWindow near the existing fields:
If the service responds, observe the live weather response and image
If it does not, observe Live weather service unavailable. Sample weather image shown.
In either case, keep the displayed image visible for the next task
The application distinguishes live information from the sample used during an external-service outage.The helper ensures an image is available; the learner still interprets the image.Go to top
6. Interpret the Weather and Reuse the Clothing Decision
The server returned weather information and the application displayed it. The next step belongs to you.
Step 1 — Make the human interpretation
Look at the displayed weather image
Decide whether the image provides evidence that it is raining
If you believe it is raining, check It is raining
If you do not believe it is raining, leave the checkbox unchecked
Do Not Let the Program Decide Yet
In 0.5, the weather image is information for a person to interpret. The application does not automatically decide whether the picture means rain.
Step 2 — Reuse the 0.3 clothing decision
Set or keep the familiar breakpoint on if (isRaining) inside ChooseClothingButton_Click
Click Choose Clothing
At the breakpoint, inspect isRaining
Verify the Boolean agrees with the checkbox state you selected
Use F10 to follow the selected path
Verify the displayed clothing recommendation matches the Boolean path
Web information influenced the human decision; the human decision supplied the Boolean used by the existing program logic.
Final Activity Diagram
Complete 0.5 flow: web information reaches the learner, the learner interprets it, and the existing Boolean decision uses that human judgment.
Check Your Work
Changing the location changes the constructed weather request
The output shows the request and returned text
The weather image is displayed from a web resource
The application does not automatically change the rain checkbox
The checkbox still controls the same Boolean decision introduced in 0.3
Key Takeaway
You have connected user input → URL → web request → response → displayed information → human interpretation → Boolean input → program decision.
Review the Feedback System results and correct any in-scope issues if required
Resubmit a corrected ZIP when needed
Step 4 — Submit the Feedback System URL to Canvas
After the required Feedback System submission is ready, copy its URL
Open the correct 0.5 First Day Assignment in Canvas
Submit the Feedback System URL as your Canvas submission
Checkpoint Summary
You constructed a web request from learner-supplied information, inspected its URL, observed the request/response flow, displayed both text and image resources returned through the Web, and then used human judgment to provide the Boolean input for the existing clothing decision.