SlideShare a Scribd company logo
1 of 2
Download to read offline
Trace the following code to determine what will be outputted when EmployeeProcessor is
run:
public class Employee {
protected double salary;
public double getSalary() {
return salary;
}
public void setSalary(double salary) {
this.salary = salary;
}
}
class FullTimeEmployee extends Employee {
private double bonus;
public double getBonus() {
return bonus;
}
public void setBonus(double bonus) {
this.bonus=bonus;
}
@Override
public double getSalary() {
return salary + bonus;
}
}
class PartTimeEmployee extends Employee {
@Override
public double getSalary() {
return salary / 2;
}
public class EmployeeProcessor {
public static void main(String[] args) {
Employee justAnEmployee = new Employee();
justAnEmployee.setSalary(10000.0);
FullTimeEmployee fulltimeemployee = new FullTimeEmployee();
fulltimeemployee.setSalary(10000.0);
fulltimeemployee.setSalary(2000.0);
PartTimeEmployee parttimeemployee = new PartTimeEmployee();
parttimeemployee.setSalary(10000.0);
System.out.print("1. My salary is: " + justAnEmployee.getSalary());
System.out.print("2. My salary is: " + fulltimeemployee.getSalary());
System.out.print("3. My salary is: " + parttimeemployee.getSalary());
}
}
}

More Related Content

Similar to Trace the following code to determine what will be outputted when Empl.pdf

import java.io.-WPS Office.docx
import java.io.-WPS Office.docximport java.io.-WPS Office.docx
import java.io.-WPS Office.docxKatecate1
 
Program.cs class Program { static void Main(string[] args).pdf
Program.cs class Program { static void Main(string[] args).pdfProgram.cs class Program { static void Main(string[] args).pdf
Program.cs class Program { static void Main(string[] args).pdfanandshingavi23
 
package employeeType.employee;public abstract class Employee {  .pdf
package employeeType.employee;public abstract class Employee {  .pdfpackage employeeType.employee;public abstract class Employee {  .pdf
package employeeType.employee;public abstract class Employee {  .pdfnipuns1983
 
C# Programming. Using methods to call results to display. The code i.pdf
C# Programming. Using methods to call results to display. The code i.pdfC# Programming. Using methods to call results to display. The code i.pdf
C# Programming. Using methods to call results to display. The code i.pdffatoryoutlets
 
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDBTDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDBtdc-globalcode
 
operating system ubuntu,Linux,Macpublic class SuperMarket {   .pdf
operating system ubuntu,Linux,Macpublic class SuperMarket {   .pdfoperating system ubuntu,Linux,Macpublic class SuperMarket {   .pdf
operating system ubuntu,Linux,Macpublic class SuperMarket {   .pdfarasanmobiles
 
this is java. problem.i already make employee class. but i can not.pdf
this is java. problem.i already make employee class. but i can not.pdfthis is java. problem.i already make employee class. but i can not.pdf
this is java. problem.i already make employee class. but i can not.pdfPRATIKSINHA7304
 
Curso Symfony - Clase 2
Curso Symfony - Clase 2Curso Symfony - Clase 2
Curso Symfony - Clase 2Javier Eguiluz
 
The Effective Developer - Work Smarter, not Harder
The Effective Developer - Work Smarter, not HarderThe Effective Developer - Work Smarter, not Harder
The Effective Developer - Work Smarter, not HarderSven Peters
 
Morgagebuildclasses.netbeans_automatic_buildMorgagebui.docx
Morgagebuildclasses.netbeans_automatic_buildMorgagebui.docxMorgagebuildclasses.netbeans_automatic_buildMorgagebui.docx
Morgagebuildclasses.netbeans_automatic_buildMorgagebui.docxgilpinleeanna
 
TDC2016SP - Trilha .NET
TDC2016SP - Trilha .NETTDC2016SP - Trilha .NET
TDC2016SP - Trilha .NETtdc-globalcode
 
Create a C# applicationYou are to create a class object called “Em.pdf
Create a C# applicationYou are to create a class object called “Em.pdfCreate a C# applicationYou are to create a class object called “Em.pdf
Create a C# applicationYou are to create a class object called “Em.pdffeelingspaldi
 
The Effective Developer - Work Smarter, Not Harder
The Effective Developer - Work Smarter, Not HarderThe Effective Developer - Work Smarter, Not Harder
The Effective Developer - Work Smarter, Not HarderSven Peters
 
source-code-program-menghitung-gaji-pegawai
source-code-program-menghitung-gaji-pegawaisource-code-program-menghitung-gaji-pegawai
source-code-program-menghitung-gaji-pegawaiKang Fatur
 
Code Include libraries. import javax.swing.JOptionPane;.pdf
Code Include libraries. import javax.swing.JOptionPane;.pdfCode Include libraries. import javax.swing.JOptionPane;.pdf
Code Include libraries. import javax.swing.JOptionPane;.pdfankitmobileshop235
 
Create a Code that will add an Add, Edi, and Delete button to the GU.pdf
Create a Code that will add an Add, Edi, and Delete button to the GU.pdfCreate a Code that will add an Add, Edi, and Delete button to the GU.pdf
Create a Code that will add an Add, Edi, and Delete button to the GU.pdflakshmijewellery
 
Simple Commsion Calculationbuild.xmlBuilds, tests, and runs t.docx
Simple Commsion Calculationbuild.xmlBuilds, tests, and runs t.docxSimple Commsion Calculationbuild.xmlBuilds, tests, and runs t.docx
Simple Commsion Calculationbuild.xmlBuilds, tests, and runs t.docxbudabrooks46239
 
Having issues with passing my values through different functions aft.pdf
Having issues with passing my values through different functions aft.pdfHaving issues with passing my values through different functions aft.pdf
Having issues with passing my values through different functions aft.pdfrajkumarm401
 
HELP IN JAVACreate a main method and use these input files to tes.pdf
HELP IN JAVACreate a main method and use these input files to tes.pdfHELP IN JAVACreate a main method and use these input files to tes.pdf
HELP IN JAVACreate a main method and use these input files to tes.pdffatoryoutlets
 

Similar to Trace the following code to determine what will be outputted when Empl.pdf (20)

import java.io.-WPS Office.docx
import java.io.-WPS Office.docximport java.io.-WPS Office.docx
import java.io.-WPS Office.docx
 
Program.cs class Program { static void Main(string[] args).pdf
Program.cs class Program { static void Main(string[] args).pdfProgram.cs class Program { static void Main(string[] args).pdf
Program.cs class Program { static void Main(string[] args).pdf
 
package employeeType.employee;public abstract class Employee {  .pdf
package employeeType.employee;public abstract class Employee {  .pdfpackage employeeType.employee;public abstract class Employee {  .pdf
package employeeType.employee;public abstract class Employee {  .pdf
 
C# Programming. Using methods to call results to display. The code i.pdf
C# Programming. Using methods to call results to display. The code i.pdfC# Programming. Using methods to call results to display. The code i.pdf
C# Programming. Using methods to call results to display. The code i.pdf
 
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDBTDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
 
slides
slidesslides
slides
 
operating system ubuntu,Linux,Macpublic class SuperMarket {   .pdf
operating system ubuntu,Linux,Macpublic class SuperMarket {   .pdfoperating system ubuntu,Linux,Macpublic class SuperMarket {   .pdf
operating system ubuntu,Linux,Macpublic class SuperMarket {   .pdf
 
this is java. problem.i already make employee class. but i can not.pdf
this is java. problem.i already make employee class. but i can not.pdfthis is java. problem.i already make employee class. but i can not.pdf
this is java. problem.i already make employee class. but i can not.pdf
 
Curso Symfony - Clase 2
Curso Symfony - Clase 2Curso Symfony - Clase 2
Curso Symfony - Clase 2
 
The Effective Developer - Work Smarter, not Harder
The Effective Developer - Work Smarter, not HarderThe Effective Developer - Work Smarter, not Harder
The Effective Developer - Work Smarter, not Harder
 
Morgagebuildclasses.netbeans_automatic_buildMorgagebui.docx
Morgagebuildclasses.netbeans_automatic_buildMorgagebui.docxMorgagebuildclasses.netbeans_automatic_buildMorgagebui.docx
Morgagebuildclasses.netbeans_automatic_buildMorgagebui.docx
 
TDC2016SP - Trilha .NET
TDC2016SP - Trilha .NETTDC2016SP - Trilha .NET
TDC2016SP - Trilha .NET
 
Create a C# applicationYou are to create a class object called “Em.pdf
Create a C# applicationYou are to create a class object called “Em.pdfCreate a C# applicationYou are to create a class object called “Em.pdf
Create a C# applicationYou are to create a class object called “Em.pdf
 
The Effective Developer - Work Smarter, Not Harder
The Effective Developer - Work Smarter, Not HarderThe Effective Developer - Work Smarter, Not Harder
The Effective Developer - Work Smarter, Not Harder
 
source-code-program-menghitung-gaji-pegawai
source-code-program-menghitung-gaji-pegawaisource-code-program-menghitung-gaji-pegawai
source-code-program-menghitung-gaji-pegawai
 
Code Include libraries. import javax.swing.JOptionPane;.pdf
Code Include libraries. import javax.swing.JOptionPane;.pdfCode Include libraries. import javax.swing.JOptionPane;.pdf
Code Include libraries. import javax.swing.JOptionPane;.pdf
 
Create a Code that will add an Add, Edi, and Delete button to the GU.pdf
Create a Code that will add an Add, Edi, and Delete button to the GU.pdfCreate a Code that will add an Add, Edi, and Delete button to the GU.pdf
Create a Code that will add an Add, Edi, and Delete button to the GU.pdf
 
Simple Commsion Calculationbuild.xmlBuilds, tests, and runs t.docx
Simple Commsion Calculationbuild.xmlBuilds, tests, and runs t.docxSimple Commsion Calculationbuild.xmlBuilds, tests, and runs t.docx
Simple Commsion Calculationbuild.xmlBuilds, tests, and runs t.docx
 
Having issues with passing my values through different functions aft.pdf
Having issues with passing my values through different functions aft.pdfHaving issues with passing my values through different functions aft.pdf
Having issues with passing my values through different functions aft.pdf
 
HELP IN JAVACreate a main method and use these input files to tes.pdf
HELP IN JAVACreate a main method and use these input files to tes.pdfHELP IN JAVACreate a main method and use these input files to tes.pdf
HELP IN JAVACreate a main method and use these input files to tes.pdf
 

More from aakriticollection61

True or false- why- A packed file's data cannot be seen in plain sight.pdf
True or false- why- A packed file's data cannot be seen in plain sight.pdfTrue or false- why- A packed file's data cannot be seen in plain sight.pdf
True or false- why- A packed file's data cannot be seen in plain sight.pdfaakriticollection61
 
True-False- Let f(n)-O(g(n)) and g(n)-O(T(n))- Is this true that f(n)-.pdf
True-False- Let f(n)-O(g(n)) and g(n)-O(T(n))- Is this true that f(n)-.pdfTrue-False- Let f(n)-O(g(n)) and g(n)-O(T(n))- Is this true that f(n)-.pdf
True-False- Let f(n)-O(g(n)) and g(n)-O(T(n))- Is this true that f(n)-.pdfaakriticollection61
 
Tube-like pharynx of common triclad planarian Dugesia can be protruded.pdf
Tube-like pharynx of common triclad planarian Dugesia can be protruded.pdfTube-like pharynx of common triclad planarian Dugesia can be protruded.pdf
Tube-like pharynx of common triclad planarian Dugesia can be protruded.pdfaakriticollection61
 
true-false The Resource-Based View of the organization considers both.pdf
true-false  The Resource-Based View of the organization considers both.pdftrue-false  The Resource-Based View of the organization considers both.pdf
true-false The Resource-Based View of the organization considers both.pdfaakriticollection61
 
True or false- Telomerase is a DNA polymerase- This is not true- telom.pdf
True or false- Telomerase is a DNA polymerase- This is not true- telom.pdfTrue or false- Telomerase is a DNA polymerase- This is not true- telom.pdf
True or false- Telomerase is a DNA polymerase- This is not true- telom.pdfaakriticollection61
 
True or False- Stimulation of the fight or flight response will cause.pdf
True or False- Stimulation of the fight or flight response will cause.pdfTrue or False- Stimulation of the fight or flight response will cause.pdf
True or False- Stimulation of the fight or flight response will cause.pdfaakriticollection61
 
True or False for the following- 1- Some infections harm only by com.pdf
True or False for the following-   1- Some infections harm only by com.pdfTrue or False for the following-   1- Some infections harm only by com.pdf
True or False for the following- 1- Some infections harm only by com.pdfaakriticollection61
 
True or false- 1) When performing a sandwich enzyme immunoassay (EIA).pdf
True or false- 1) When performing a sandwich enzyme immunoassay (EIA).pdfTrue or false- 1) When performing a sandwich enzyme immunoassay (EIA).pdf
True or false- 1) When performing a sandwich enzyme immunoassay (EIA).pdfaakriticollection61
 
TRUE OR FALSE- 1- the improvement in the value of the optimal solution.pdf
TRUE OR FALSE- 1- the improvement in the value of the optimal solution.pdfTRUE OR FALSE- 1- the improvement in the value of the optimal solution.pdf
TRUE OR FALSE- 1- the improvement in the value of the optimal solution.pdfaakriticollection61
 
True or False IDA Pro can show the connection between the loops in an.pdf
True or False IDA Pro can show the connection between the loops in an.pdfTrue or False IDA Pro can show the connection between the loops in an.pdf
True or False IDA Pro can show the connection between the loops in an.pdfaakriticollection61
 
True or False Chronic low-grade Inflammation appears to be involved wi.pdf
True or False Chronic low-grade Inflammation appears to be involved wi.pdfTrue or False Chronic low-grade Inflammation appears to be involved wi.pdf
True or False Chronic low-grade Inflammation appears to be involved wi.pdfaakriticollection61
 
True or False- Because physician-assisted suicide in the case of patie.pdf
True or False- Because physician-assisted suicide in the case of patie.pdfTrue or False- Because physician-assisted suicide in the case of patie.pdf
True or False- Because physician-assisted suicide in the case of patie.pdfaakriticollection61
 
True or false In the Prior Appropriation system- the earliest water r.pdf
True or false  In the Prior Appropriation system- the earliest water r.pdfTrue or false  In the Prior Appropriation system- the earliest water r.pdf
True or false In the Prior Appropriation system- the earliest water r.pdfaakriticollection61
 
True or False 1- Deadlisting is as important as debugging a program- 2.pdf
True or False 1- Deadlisting is as important as debugging a program- 2.pdfTrue or False 1- Deadlisting is as important as debugging a program- 2.pdf
True or False 1- Deadlisting is as important as debugging a program- 2.pdfaakriticollection61
 
True or false The legal test for the validity of a Riparian Right is.pdf
True or false  The legal test for the validity of a Riparian Right is.pdfTrue or false  The legal test for the validity of a Riparian Right is.pdf
True or false The legal test for the validity of a Riparian Right is.pdfaakriticollection61
 
True or False The hydrologic cycle is the complete and continuous pro.pdf
True or False  The hydrologic cycle is the complete and continuous pro.pdfTrue or False  The hydrologic cycle is the complete and continuous pro.pdf
True or False The hydrologic cycle is the complete and continuous pro.pdfaakriticollection61
 
True or false A test of reasonable use is that it does not interfere.pdf
True or false  A test of reasonable use is that it does not interfere.pdfTrue or false  A test of reasonable use is that it does not interfere.pdf
True or false A test of reasonable use is that it does not interfere.pdfaakriticollection61
 
True or false A well drilled into a confined aquifer may flow without.pdf
True or false  A well drilled into a confined aquifer may flow without.pdfTrue or false  A well drilled into a confined aquifer may flow without.pdf
True or false A well drilled into a confined aquifer may flow without.pdfaakriticollection61
 
True or False 1- Financial accounting is the area of accounting aime.pdf
True or False   1- Financial accounting is the area of accounting aime.pdfTrue or False   1- Financial accounting is the area of accounting aime.pdf
True or False 1- Financial accounting is the area of accounting aime.pdfaakriticollection61
 
True - False (1 point each) Total 12 Evaluate the following sach) Tota.pdf
True - False (1 point each) Total 12 Evaluate the following sach) Tota.pdfTrue - False (1 point each) Total 12 Evaluate the following sach) Tota.pdf
True - False (1 point each) Total 12 Evaluate the following sach) Tota.pdfaakriticollection61
 

More from aakriticollection61 (20)

True or false- why- A packed file's data cannot be seen in plain sight.pdf
True or false- why- A packed file's data cannot be seen in plain sight.pdfTrue or false- why- A packed file's data cannot be seen in plain sight.pdf
True or false- why- A packed file's data cannot be seen in plain sight.pdf
 
True-False- Let f(n)-O(g(n)) and g(n)-O(T(n))- Is this true that f(n)-.pdf
True-False- Let f(n)-O(g(n)) and g(n)-O(T(n))- Is this true that f(n)-.pdfTrue-False- Let f(n)-O(g(n)) and g(n)-O(T(n))- Is this true that f(n)-.pdf
True-False- Let f(n)-O(g(n)) and g(n)-O(T(n))- Is this true that f(n)-.pdf
 
Tube-like pharynx of common triclad planarian Dugesia can be protruded.pdf
Tube-like pharynx of common triclad planarian Dugesia can be protruded.pdfTube-like pharynx of common triclad planarian Dugesia can be protruded.pdf
Tube-like pharynx of common triclad planarian Dugesia can be protruded.pdf
 
true-false The Resource-Based View of the organization considers both.pdf
true-false  The Resource-Based View of the organization considers both.pdftrue-false  The Resource-Based View of the organization considers both.pdf
true-false The Resource-Based View of the organization considers both.pdf
 
True or false- Telomerase is a DNA polymerase- This is not true- telom.pdf
True or false- Telomerase is a DNA polymerase- This is not true- telom.pdfTrue or false- Telomerase is a DNA polymerase- This is not true- telom.pdf
True or false- Telomerase is a DNA polymerase- This is not true- telom.pdf
 
True or False- Stimulation of the fight or flight response will cause.pdf
True or False- Stimulation of the fight or flight response will cause.pdfTrue or False- Stimulation of the fight or flight response will cause.pdf
True or False- Stimulation of the fight or flight response will cause.pdf
 
True or False for the following- 1- Some infections harm only by com.pdf
True or False for the following-   1- Some infections harm only by com.pdfTrue or False for the following-   1- Some infections harm only by com.pdf
True or False for the following- 1- Some infections harm only by com.pdf
 
True or false- 1) When performing a sandwich enzyme immunoassay (EIA).pdf
True or false- 1) When performing a sandwich enzyme immunoassay (EIA).pdfTrue or false- 1) When performing a sandwich enzyme immunoassay (EIA).pdf
True or false- 1) When performing a sandwich enzyme immunoassay (EIA).pdf
 
TRUE OR FALSE- 1- the improvement in the value of the optimal solution.pdf
TRUE OR FALSE- 1- the improvement in the value of the optimal solution.pdfTRUE OR FALSE- 1- the improvement in the value of the optimal solution.pdf
TRUE OR FALSE- 1- the improvement in the value of the optimal solution.pdf
 
True or False IDA Pro can show the connection between the loops in an.pdf
True or False IDA Pro can show the connection between the loops in an.pdfTrue or False IDA Pro can show the connection between the loops in an.pdf
True or False IDA Pro can show the connection between the loops in an.pdf
 
True or False Chronic low-grade Inflammation appears to be involved wi.pdf
True or False Chronic low-grade Inflammation appears to be involved wi.pdfTrue or False Chronic low-grade Inflammation appears to be involved wi.pdf
True or False Chronic low-grade Inflammation appears to be involved wi.pdf
 
True or False- Because physician-assisted suicide in the case of patie.pdf
True or False- Because physician-assisted suicide in the case of patie.pdfTrue or False- Because physician-assisted suicide in the case of patie.pdf
True or False- Because physician-assisted suicide in the case of patie.pdf
 
True or false In the Prior Appropriation system- the earliest water r.pdf
True or false  In the Prior Appropriation system- the earliest water r.pdfTrue or false  In the Prior Appropriation system- the earliest water r.pdf
True or false In the Prior Appropriation system- the earliest water r.pdf
 
True or False 1- Deadlisting is as important as debugging a program- 2.pdf
True or False 1- Deadlisting is as important as debugging a program- 2.pdfTrue or False 1- Deadlisting is as important as debugging a program- 2.pdf
True or False 1- Deadlisting is as important as debugging a program- 2.pdf
 
True or false The legal test for the validity of a Riparian Right is.pdf
True or false  The legal test for the validity of a Riparian Right is.pdfTrue or false  The legal test for the validity of a Riparian Right is.pdf
True or false The legal test for the validity of a Riparian Right is.pdf
 
True or False The hydrologic cycle is the complete and continuous pro.pdf
True or False  The hydrologic cycle is the complete and continuous pro.pdfTrue or False  The hydrologic cycle is the complete and continuous pro.pdf
True or False The hydrologic cycle is the complete and continuous pro.pdf
 
True or false A test of reasonable use is that it does not interfere.pdf
True or false  A test of reasonable use is that it does not interfere.pdfTrue or false  A test of reasonable use is that it does not interfere.pdf
True or false A test of reasonable use is that it does not interfere.pdf
 
True or false A well drilled into a confined aquifer may flow without.pdf
True or false  A well drilled into a confined aquifer may flow without.pdfTrue or false  A well drilled into a confined aquifer may flow without.pdf
True or false A well drilled into a confined aquifer may flow without.pdf
 
True or False 1- Financial accounting is the area of accounting aime.pdf
True or False   1- Financial accounting is the area of accounting aime.pdfTrue or False   1- Financial accounting is the area of accounting aime.pdf
True or False 1- Financial accounting is the area of accounting aime.pdf
 
True - False (1 point each) Total 12 Evaluate the following sach) Tota.pdf
True - False (1 point each) Total 12 Evaluate the following sach) Tota.pdfTrue - False (1 point each) Total 12 Evaluate the following sach) Tota.pdf
True - False (1 point each) Total 12 Evaluate the following sach) Tota.pdf
 

Recently uploaded

e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaEADTU
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital ManagementMBA Assignment Experts
 
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdf
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdfContoh Aksi Nyata Refleksi Diri ( NUR ).pdf
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdfcupulin
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesAmanpreetKaur157993
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...Nguyen Thanh Tu Collection
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportDenish Jangid
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFVivekanand Anglo Vedic Academy
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17Celine George
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文中 央社
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMELOISARIVERA8
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppCeline George
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code ExamplesPeter Brusilovsky
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
 

Recently uploaded (20)

ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdf
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdfContoh Aksi Nyata Refleksi Diri ( NUR ).pdf
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdf
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 

Trace the following code to determine what will be outputted when Empl.pdf

  • 1. Trace the following code to determine what will be outputted when EmployeeProcessor is run: public class Employee { protected double salary; public double getSalary() { return salary; } public void setSalary(double salary) { this.salary = salary; } } class FullTimeEmployee extends Employee { private double bonus; public double getBonus() { return bonus; } public void setBonus(double bonus) { this.bonus=bonus; } @Override public double getSalary() { return salary + bonus; } } class PartTimeEmployee extends Employee { @Override public double getSalary() { return salary / 2; } public class EmployeeProcessor { public static void main(String[] args) { Employee justAnEmployee = new Employee(); justAnEmployee.setSalary(10000.0);
  • 2. FullTimeEmployee fulltimeemployee = new FullTimeEmployee(); fulltimeemployee.setSalary(10000.0); fulltimeemployee.setSalary(2000.0); PartTimeEmployee parttimeemployee = new PartTimeEmployee(); parttimeemployee.setSalary(10000.0); System.out.print("1. My salary is: " + justAnEmployee.getSalary()); System.out.print("2. My salary is: " + fulltimeemployee.getSalary()); System.out.print("3. My salary is: " + parttimeemployee.getSalary()); } } }