In this lab you will create small Java applications by using as reference an UML class diagram. Please consider following general notes before start implementing:
- toString() method when required will return a string like ClassName{attributeName1=attributeValue1,...,attributeNamen=attributeValuen}.
- add any constructors, getter, setters or other methods you consider are required even if are not explicitly presented in the diagrams.
- Do not reuse (import) the same class in multiple exercises. Each exercise is standalone and should be resolved in its package.
For all bellow exercises:
- Create Java application based on the provided UML class diagram
- Create main method and create some objects to demonstrate the functionality
- Create a minimal unit test for testing the behavior of the created class.
Given the UML class diagram above, implement the corresponding Java program.
Given the UML class diagram above, implement the corresponding Java program. The maximum battery level is 100. Implement the logic of charging the devices. The 3 devices have different charging speeds. E.g. A smartwatch is charged to 20% in 10 min.
Given the UML class diagram above, implement the corresponding Java program.
Above picture presentes a high level concept of an event ticketing system.
- Create a class diagram to model minimal functionalities of event ticketing system.
- Create the minimal application based on the class diagram you have created.
NOTE 1 In your implementation, use at least two of the following type definitions: enum, interface, abstract class.
NOTE 2 No real impementaion is needed (no need to generate qr codes, integrate payment service, etc). The class diagram you create and the application will only simulate various features of the application by simply displaying messages. The focus will be in identifying main features of each of the components. Model each component as a class. Identify the relation (collaboration) between classes and try to model this interactions in the application.