Question: Create a Fruit class that has 4 properties: ( Fruit _ name, Fcolor, Fweight and price ) . a ) Declare a Parameterized constructor with
Create a Fruit class that has properties: Fruitname, Fcolor, Fweight and price
a Declare a Parameterized constructor with three parameters.
b Implement the concept of constructor overloading and method overloading.
c Declare accessor methods to return values.
d Declare mutator method to change the Fruitname to Apple.
e Create two object namely F and Frt and invoke the methods.
Create a super class player with attributes playername, noof players and coach.
a Create a subclass footballplayer with attributes city and age.
b Declare a method to verify the player.If the age display "Allowed to playthe game" otherwise display "Denied to play the game"
c Create two objects and assign the values.
a Create an interface called FLab with attribute dayofexam and a method display
b Create a class Teacher which implements the Interface with attributes coursename and coursecode. Declare a method details to print "She teaches BlueJ". Call the display method to print the dayofexam.
c Create a class Student which extends Teacher with attribute roomnumber. Override the details and print the course details from teacher class.
a Create a class HMapclass and using a Hashmap add cities and their zipcodes. Write a method to print the rd city and its Zipcode.
b Create another class AListclass which extends the
HMapclass.In this class declare a ArrayList and add names of Universities and print the list using foreach loop.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
