subject

A system uses three (3) temperature sensors produced by the same vendor V1 to monitor the condition of a hardware device at a specific time: – The first sensor is of type TS1. – The second sensor is of type TS2. – The third sensor is of type TS3.TS1, TS2, and TS3 accept as input a date (date/month/year: 18/03/2020) and time (given in Eastern Standard Time or EST) and return a temperature in Fahrenheit. Time is in the 24-hour time keeping system (e. g., 23:59:59). V1 supplies a class to interface with its sensors:Class TS1 {Public double getTemp(date d, time t) {// returns Temp in Fahrenheit // t is in EST time // t is in the 24-hour time keeping system (e. g., 23:59:59) // Code Goes here} }Class TS2 {Public double getTemp(date d, time t) {// returns Temp in Fahrenheit // t is in EST time // t is in the 24-hour time keeping system (e. g., 23:59:59) // Code Goes here} }Class TS3 {Public double getTemp(date d, time t) {// returns Temp in Fahrenheit // t is in EST time // t is in the 24-hour time keeping system (e. g., 23:59:59) // Code Goes here} }We would like to add a third sensor of type TS4 provided by vendor V2. TS4 accepts as inputs a year, month, day, and time (specified in Pacific Standard Time or PST) and returns a temperature in 1/10 of Celsius. Time is specified in the AM/PM format (12-hour clock).Below is the interface for TS4:Class TS4 {Public double getTS4Temp(year y, month m, day d, time t, string when) {// returns Temp in 1/10 Celsius // Fahrenheit = (Celsius -32) * 5/9 // t is in PST time // t is specified in the AM/PM format (12-hour clock) // PST = EST – 3 // when="AM" or when="PM" // Code Goes here} }1) Give the UML class diagram for the application using the object adapter pattern.2) Provide the implementation code of the UML class diagram given in question 1 in Java. The client application should read a date and time from the user and compute the average temperature of the four sensors at that date and time.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Which one of the following identifies the primary a purpose of information classification processes? a. define the requirements for protecting sensitive data.b. define the requirements for backing up data.c. define the requirements for storing data.d. define the requirements for transmitting data.
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 1
question
Computers and Technology, 23.06.2019 03:30
In vista and windows 7, the appearance and personalization option allows you to change the
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
You know the right answer?
A system uses three (3) temperature sensors produced by the same vendor V1 to monitor the condition...
Questions
question
Mathematics, 23.05.2021 03:50
question
Mathematics, 23.05.2021 04:00
question
English, 23.05.2021 04:00
question
Mathematics, 23.05.2021 04:00
Questions on the website: 13722361