Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

14. (7 marks) Consider the classes Person and EmployeeRecord, iven below. Identify and fix any shallow returns which may occur. Also, write an appropriate copy

image text in transcribed
14. (7 marks) Consider the classes Person and EmployeeRecord, iven below. Identify and fix any shallow returns which may occur. Also, write an appropriate copy constructor for the EmployeeRecord class. public class Person t public elass EnployeeRecord pzivate string firstName private string lastName private Person enployee: private int employeelDs public Person (String fName, String 1Name) public EmployeeRecord (Person e, int ID setName (EName, Name) this.employee -e employeelD ID publia void setName (String fName, String 1Name) publie void setinto (Person,int ID) this.firstName -fName this.lastName 1Name this.employee employeeID ID publie string getFirstName ) publie Person getEmployee) return firstName return employee public String getLastName ) publio int get1DO return lastName : return employeeID

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_2

Step: 3

blur-text-image_3

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

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

Students also viewed these Databases questions

Question

Do you currently have a team agreement?

Answered: 1 week ago

Question

How will the members be held accountable?

Answered: 1 week ago