Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE SOLVE THIS JAVA TASK : Create a class called Family. The family class will have the following variables and methods: variables: 1.number of family

PLEASE SOLVE THIS JAVA TASK:

Create a class called Family. The family class will have the following variables and methods:

variables: 1.number of family members 2.type of family (this may represent the extended, nuclear, joint etc. family type) 3.family surname 4.number of wedding attended house 5.physician( this variable is of the user-defined datatype)

methods: 1.A toString() to print all the values in string format. 2.Getter and setter methods to access and modify the variables (therefore the number of methods will be 2times the number of variables.) 3.Constructors with and without parameters 4.A method to increase the number of wedding attended each time the method is called.

then

Write the following functions in Record Class: a. view for viewing records in your file, b. add for adding records in your file, c. search this function will read a search key (e.g. surname) from user, search for that key in your file, and then show info of all the records that matches the search key; for example, if the user searches for all family whose name is Rahman then your program will show the info of all Family whose surname is Rahman d. edit this function will read a search key, show the info of all records which matches that key (just like search function), asks the user to select which record s/he wants to edit/modify, read the new info given by the user and use those to replace the old values of that record. Please note that the name you are using in family records those should be the real names that relates to you, do not use names from your friend's family. For other values you can use imaginary values.

then

Create a class called Physician. The family class will have the following variables and methods:

variables: 1. highest level of degree 2. type of physician (this may represent the specialization of doctors expertise) 3. surname 4. number of visit to the family 5.fee per visit total payment

methods: 1.A toString() to print all the values in string format. 2.Getter and setter methods to access and modify the variables (therefore the number of methods will be 2times the number of variables.) 3.Constructors with and without parameters. Initially, total payment and total number of visits must be set to zero. 4.A method to increase the number of visits each time the method is called. 5.A method to decrease the number of visits each time the method is called, this may apply when an appointment is cancelled. 6.A method to determine and print the experience of the physician depending on the number of total visits

then

Create a separate DriverClass. Create Main method and call each and every method you have defined.

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

b. What are its goals and objectives?

Answered: 1 week ago