Question: Java programming question (Object oriented programming) Answer FULL question properly for thumbs up: Question 3 (a) The UML diagram below shows part of the object-oriented
Java programming question (Object oriented programming)
Answer FULL question properly for thumbs up:
Question 3 (a) The UML diagram below shows part of the object-oriented design for a mobile app that manages data from the training activities of runners and cyclists. Measurement Location Activity timestamp: Date Time - latitude: double longitude: double elevation: double - heartRate: int Write down the Java code implied by this class diagram. Focus on classes and their fields; do not speculate about methods or their implementations. Assume that the class DateTime is available in a package called java.time. (b) The app in (a) also has classes called Run and BikeRide. What is the ideal form of relationship between these two classes and those shown in (a)? Draw a simple UML class diagram tolstrate your answer. (c) A software developer suggests altering the UML diagram in (a) so that the name of the Activity class is in italics. Why has he made this suggestion? (d) A programmer implementing the Location class from (a) tries printing out the value of a Location object. She sees output like the following: Location@15db9742 Why does she see this? What would she have to do in order for printing to generate more sensible and useful output? (e) The same programmer now implements the Measurement class. She decides it would be useful if Measurement objects could be sorted into chronological order. Describe how this feature could be added to the class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
