Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please just answer part B only a. Suppose you have a Shape hierarchy as follows: Shape Now you want to add a Circle class, but

Please just answer part B only
image text in transcribed
a. Suppose you have a Shape hierarchy as follows: Shape Now you want to add a Circle class, but you hear that someone else has already created one, named XXCircle, and you just want to reuse it. Its interface is slightly different though ocation) Draw a UML diagram that adapts this class to your hierarchy. Write skeleton code that just uses print statements for all the methods and write a test driver that creates a sequence of Shapes and displays all of the shapes it contains, verifying that your Circle class nicely coexists with the other types of Shape. Submit your UML diagram, working code and a screen shot of your program's output. b. A web application uses a database to get Employee data. The application could use the database API directly, but this would result in a number of low-level SQL calls scattered throughout the code (setting the connection, building queries, extracting results, building Employee objects, etc.). Explain how you carn design the application so that it is not directly dependent on the database used, and so getting and setting employee data won't be such a pain

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

More Books

Students also viewed these Databases questions

Question

denigration of emotional outbursts; being reserved;

Answered: 1 week ago