Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

must be done in java Question#2: Design and implement a Java program using Abstract Factory and Singleton design patterns. The program displays date and time

image text in transcribedmust be done in java

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data With Hadoop MapReduce A Classroom Approach

Authors: Rathinaraja Jeyaraj ,Ganeshkumar Pugalendhi ,Anand Paul

1st Edition

1774634848, 978-1774634844

More Books

Students also viewed these Databases questions

Question

Make efficient use of your practice time?

Answered: 1 week ago