Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Let us consider the following XML document containing information about average daily temperatures at various cities in different days: 2021-01-01 Dearborn 24 Detroit 20 Ann

Let us consider the following XML document containing information about average daily temperatures at various cities in different days:

2021-01-01 Dearborn 24 Detroit 20 Ann Arbor 28 Flint 26 2021-01-02 Dearborn 22 Detroit 17 Ann Arbor 25 Flint 21

The following is a JSON document containing the same information:

{ weather: [ {city:Dearborn, date: 2021-01-01, temperature:24}, {city:Detroit, date: 2021-01-01, temperature:20}, {city:Ann Arbor, date: 2021-01-01, temperature:28}, {city:Flint, date: 2021-01-01, temperature:26} {city:Dearborn, date: 2021-01-02, temperature:20}, {city:Detroit, date: 2021-01-02, temperature:17}, {city:Ann Arbor, date: 2021-01-02, temperature:25}, {city:Flint, date: 2021-01-02, temperature:21} ] }

In this project, we assume that all XML and JSON documents follow the exact format shown in the example given above. However, your implementation should work for any data included in the documents. For example, the documents may include additional dates and cities as well as different values for the temperatures.

Implement a program that asks the user to provide either a JSON or XML document and displays the average temperature (across all cities) for each day. You are allowed to use the programming language of your choice

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago