![SmokeyRN](/avatars/20508.jpg)
SmokeyRN
28.03.2020 •
Computers and Technology
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.
Solved
Show answers
More tips
- C Computers and Internet How to Delete a Page on VKontakte: The Ultimate Guide from Experts...
- S Style and Beauty 5 Tips for Choosing the Best Ugg Boots...
- H Health and Medicine How to Treat the Flu: A Comprehensive Guide...
- H Health and Medicine Effective Ways to Treat Colic in Infants...
- C Computers and Internet IMHO: What is it, why is it important, and how to use it?...
- F Food and Cooking How to Calculate the Gender of Your Child with Blood?...
- S Style and Beauty How to Get Rid of Under Eye Bruises?...
- C Cities and Countries What time does the Metro open in Moscow?...
- W Work and Career Where can you learn to be a flight attendant?...
- H Health and Medicine What are Electronic Cigarettes? The Ultimate Guide...
Answers on questions: Computers and Technology
- H History What physical feature did the earliest villages rely upon the most?...
- E English His rancor, or hatred, of his brother has caused him to live his life as a lonely person. The word rancor in this sentence means context clues...
- B Biology Which reason/s explain the presence of bicarbonate in seawater as being important? Select ALL that apply. Bicarbonate is able to maintain a stable environment for...
- M Mathematics Algebra 2. The piecewise function for give graph is f(x). Please help...
- E English Which sentence or phrase from the passage most likely helped Micah make his inference? it will be a gruesome day; Then my face won’t be there to be covered in death:...
- S Social Studies What are some of the tenets that guide the Armed Forces of the U.S. in multinational cooperative activities? (Select all that apply.)...
- M Mathematics The coordinates of point A are 400 units of X and 40 units of Y. The coordinates of point B are 480 units of X and 60 units of Y. With X on the horizontal axis and...
- M Mathematics Earth rotates on an axis through its poles. The distance from the axis to a location on Earth at 40 degrees north latitude is about 3033.5 miles. Therefore a location...
- M Mathematics PLEASE HELP!! MEEEEE 1...
- M Mathematics To solve 2x+9=21, what is the first step?...
Ответ:
D
Explanation: bc it makes her feel sad whenever the strictness comes in