Question
Preparation Create a project called ProgrammableThermostat in NetBeans. Review the temperature.json file found below Read the u03a1 User Story found below Your code will need
Preparation
- Create a project called "ProgrammableThermostat" in NetBeans.
- Review the temperature.json file found below
- Read the u03a1 User Story found below
- Your code will need to read temperature data stored in JSON format using a web service to access the JSON information stored on a Capella web server. You will create a web query to retrieve the data. The result of the query will be returned as JSON data.
Create Classes and Build the Display Driver
Open your ProgrammableThermostat project in NetBeans, then write Java classes that employ standard Java coding conventions for building the display driver specified in the u03a1 User Story:
Do the following:
- Develop Java networking classes/methods that read the temperature data from the web service.
- Develop Java classes/methods that convert the raw temperature data into Java objects.
- Build a driver to display the temperature data on the Java Console. Note the following:
- You do not need to create a GUI; your data should be displayed in the NetBeans Java Console.
- Take a screen shot of the completed Java Console to submit with your assignment.
Temperature.json
{
"identifier": "318324702718",
"name": "ProgrammableThermostat",
"thermostatTime": "2015-02-11 15:58:03",
"utcTime": "2015-02-11 20:58:03",
"runtime": {
"actualTemperature": 711,
"actualHumidity": 42,
},
"status": {
"code": 0,
"message": ""
}
}
User story:
As a ProgrammableThermostat, I want to access the temperature readings for the living space that I control and see the results.
Acceptance Criteria:
- Ability to read a web service that contains various temperature readings.
- Ability to map the retrieved data into internal software classes/objects.
- Display the values so that they can be visibly confirmed as correct.
Acceptance Testing:
- Web Service is accessible.
- Temperature data can be retrieved using an HTTP GET request.
- ProgrammableThermostat must support various non-successful responses (such as Not Found).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started