1. Engineering
  2. Computer Science
  3. must be done in java...

Question: must be done in java...

Question details

Question#2: Design and implement a Java program using Abstract Factory and Singleton design patterns. The program displays date and time in one of the following two formats Format 1 Date: MM/DD/YYYY Time: HH:MM:SS Format 2 Date: DD-MM-YYYY Time: SS,MM,HH The following is how the program works. In the beginning, the program asks the user what display format that she wants. Then the program continuously asks the user to give one of the following commands, and performs the corresponding task. Note that the program gets the current date and time from the system clock (use the appropriate Java date and time operations for this) d : display current date t: display current time q: quit the program. In the program, there should be 2 product hierarchies: DateObject and TimeObject. Each hierarchy should have formatl and format2 described above Implement the concrete factories as singleton classes Draw a UML class diagram for the program.must be done in java

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution