Java

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Java

Post by answerhappygod »

Java
Java 1
Java 1 (138.38 KiB) Viewed 18 times
Question 1 (8 marks) The World Meteorological Organization created a file hightemp.txt with information about the highest temperatures recorded every day in a number of cities all over the world. The file higtemp.txt is a text file where information about the highest temperature recorded on a given day, in a given city is stored in a single row. Data items like date, temperature, city name are separated with a single blank. For example, few sample rows from the file are listed below. 01-JAN-1991 25 Sydney 01-JAN-1991 30 Brisbane 01-JAN-1991 32 Singapore 02-JAN-1991 25 Sydney 02-JAN-1991 31 Brisbane 02-JAN-1991 35 Singapore 05-JUN-2022 15 Sydney 05-JUN-2022 20 Brisbane 05-JUN-2022 25 Singapore (1) 6 marks Write an implementation of Map-Reduce application that lists the highest temperature recorded together with a name of city where such temperature was recorded in a given year. Organize your application such that it would be possible to re-use it for any given year. For example, if we process only 9 rows visible above then the highest temperature recorded in 1991 was 35 in Singapore. Assume that due to the global warming no negative temperatures are recorded. To write your application use Java programming language or pseudo-code at a level of complexity of Java statements. So, for example, you can write your application in Python or in some other pseudo-code that looks like Java. It is compulsory to include the comments explaining your code. Please, write only the implementations of Mapper and Reducer. (2) 2 marks Assume that source code of your application is written in Java and it is available in a file highest.java. List all steps you should follow to get the outcomes from preparation and processing of your application. For example, to list the highest temperatures recorded, together with a city where such temperature was recorded in 2021.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply