[phpBB Debug] PHP Warning: in file [ROOT]/ext/lmdi/autolinks/event/listener.php on line 237: Undefined array key 15
[phpBB Debug] PHP Warning: in file [ROOT]/ext/lmdi/autolinks/event/listener.php on line 237: Trying to access array offset on value of type null
Answer Happy • please solve fast 🙏🏼
Page 1 of 1

please solve fast 🙏🏼

Posted: Tue Jul 05, 2022 10:27 am
by answerhappygod
please solve fast 🙏🏼
Please Solve Fast 1
Please Solve Fast 1 (243.35 KiB) Viewed 11 times
QUESTION 1 Assume that class Person has following two private data fields: private String name; private int cpr; and following constructor: public Person(String n, int c) { name = n; cpr = c; } Now, we want to write a class called Employee that inherits the properties of class Person having following two data fields: private String position; private double salary; The constructor of class Employee can be written as follows: © ª public Employee(String n, int c, String p, double s) { this(n, c); position = p; salary = m; } © b. public Employee(String n, int c, String p, double s) { super(n, c); position = p; salary = s; } Ⓒc public Employee(String n, int c, String p, double s) [Person.super(n, c); position = p; salary = s; } Od public Employee(String n, int c, String p, double s) [name = n; cpr = c; position = p; salary = s; } QUESTION 2