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 4 properties: (Fruit_name, 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 Fruit_name to Apple.
e) Create two object namely F1 and Frt and invoke the methods.
Create a super class player with attributes playername, no_of players and coach.
a) Create a subclass football_player with attributes city and age.
b) Declare a method ) to verify the player.If the age 21 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 5 cities and their zipcodes. Write a method to print the 3rd city and its Zipcode.
b) Create another class AListclass which extends the
HMapclass.In this class declare a ArrayList and add 5 names of Universities and print the list using for-each loop.
Create a Fruit class that has 4 properties: (

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!