Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Section B Pet names ownede 1 string + Tetine stigting) gethel I String getovere string Cat numberOfTeth int Lengthofal tint Budgie colourfrather string Cat (name:string,

image text in transcribed
Section B Pet names ownede 1 string + Tetine stigting) gethel I String getovere string Cat numberOfTeth int Lengthofal tint Budgie colourfrather string Cat (name:string, overrane: string. brotteethiant. Lengthoftail:int) Det Number of Teeth (int VetLengthorta111 Badge inane: string, Dating colorofteathers:string) getcolour of reatherst) string 1. Convert the UML class diagram above into a java code with the following conditions The methods in the Pet class are abstract Create a class called test. The main() method in the test class should create three Car objects and two Budgie objects. The main() method should also create indirectly an object of the Per class. iii Demonstrate polymorphism in your test class. 2. Write a Java Code for a simple GUI calculator application. The program should be able to handle user errors. Use more than one layout manager in your code. 3. Implement a simple stack in java using the scenario below. Acompany wishes to keep track of the order in which it employed staff. User can enter either "1" to fire, "W" to hire or "e" to end program. When a member of staffis employed, their employee number is added to the top of a stack when someone has to be made redundant, the last person to join the company is removed from the top of the stack. Hint: Use ArrayList

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

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books