SlideShare a Scribd company logo
1 of 1
Download to read offline
public class DimmableFloorLamp extends FloorLamp implements Dimmable { public void
turnOff() { System.out.print("Dimmable Off: "); public void turnOn(){
System.out.print("Dimmable On: "); } public void setTo(int value) {
System.out.print("Dimmable DimVal:" + value + ": "); } Consider this instantiation code: Room
r = new Room ( ) ; DimmableFloorLamp p = new Dimmable(); r . setLamp ( p ) ; r.
turnLightOn(); r.turnLightoff(); Will it compile, and if yes, what will it print? a. Dimmable On:
Dimmable Off: b. Runtime Error c. Compilation Error d. Dimmable On: Floor Off: e. Lamp On:
Dimmable Off:

More Related Content

More from 3rdeyesolutions

python code plz Task 2 1- Create a list with the digits in your studen.pdf
python code plz Task 2 1- Create a list with the digits in your studen.pdfpython code plz Task 2 1- Create a list with the digits in your studen.pdf
python code plz Task 2 1- Create a list with the digits in your studen.pdf3rdeyesolutions
 
PYTHON - time and space complexity for the next function- def some_fun.pdf
PYTHON - time and space complexity for the next function- def some_fun.pdfPYTHON - time and space complexity for the next function- def some_fun.pdf
PYTHON - time and space complexity for the next function- def some_fun.pdf3rdeyesolutions
 
Python - Explain the concept- and why you found it interesting- How w.pdf
Python -  Explain the concept- and why you found it interesting- How w.pdfPython -  Explain the concept- and why you found it interesting- How w.pdf
Python - Explain the concept- and why you found it interesting- How w.pdf3rdeyesolutions
 
Put the steps of endochondral ossification in the correct order- Your.pdf
Put the steps of endochondral ossification in the correct order- Your.pdfPut the steps of endochondral ossification in the correct order- Your.pdf
Put the steps of endochondral ossification in the correct order- Your.pdf3rdeyesolutions
 
Put the events of HIV infection in the correct order- HIV fuses to the.pdf
Put the events of HIV infection in the correct order- HIV fuses to the.pdfPut the events of HIV infection in the correct order- HIV fuses to the.pdf
Put the events of HIV infection in the correct order- HIV fuses to the.pdf3rdeyesolutions
 
Put the following events in the proper order of occurrence when RIK pa.pdf
Put the following events in the proper order of occurrence when RIK pa.pdfPut the following events in the proper order of occurrence when RIK pa.pdf
Put the following events in the proper order of occurrence when RIK pa.pdf3rdeyesolutions
 
Put an I if the term refers to Innate Immunity Put an A if the term re.pdf
Put an I if the term refers to Innate Immunity Put an A if the term re.pdfPut an I if the term refers to Innate Immunity Put an A if the term re.pdf
Put an I if the term refers to Innate Immunity Put an A if the term re.pdf3rdeyesolutions
 
Pure tone averages (PTAs) give us information about- how well a person.pdf
Pure tone averages (PTAs) give us information about- how well a person.pdfPure tone averages (PTAs) give us information about- how well a person.pdf
Pure tone averages (PTAs) give us information about- how well a person.pdf3rdeyesolutions
 
public class EllipsoidList { private String list- private Array.pdf
public class EllipsoidList {     private String list-    private Array.pdfpublic class EllipsoidList {     private String list-    private Array.pdf
public class EllipsoidList { private String list- private Array.pdf3rdeyesolutions
 
Public Administration -what kind of challenges does the Department of.pdf
Public Administration -what kind of challenges does the Department of.pdfPublic Administration -what kind of challenges does the Department of.pdf
Public Administration -what kind of challenges does the Department of.pdf3rdeyesolutions
 
public class ImpPythTripEx public static double---- triples - new d.pdf
public class ImpPythTripEx    public static double---- triples - new d.pdfpublic class ImpPythTripEx    public static double---- triples - new d.pdf
public class ImpPythTripEx public static double---- triples - new d.pdf3rdeyesolutions
 
public class Integenthalysis public static doumle analyreints(iet max-.pdf
public class Integenthalysis public static doumle analyreints(iet max-.pdfpublic class Integenthalysis public static doumle analyreints(iet max-.pdf
public class Integenthalysis public static doumle analyreints(iet max-.pdf3rdeyesolutions
 
PT ANRJ issues a IDR 450 million IPO priced at IDR 130 per share- and.pdf
PT ANRJ  issues a IDR 450 million IPO priced at IDR 130 per share- and.pdfPT ANRJ  issues a IDR 450 million IPO priced at IDR 130 per share- and.pdf
PT ANRJ issues a IDR 450 million IPO priced at IDR 130 per share- and.pdf3rdeyesolutions
 
Proxemics refers to the- a- the role of videography and photography in.pdf
Proxemics refers to the- a- the role of videography and photography in.pdfProxemics refers to the- a- the role of videography and photography in.pdf
Proxemics refers to the- a- the role of videography and photography in.pdf3rdeyesolutions
 
Psychologists have studied identical twins and have identified specifi.pdf
Psychologists have studied identical twins and have identified specifi.pdfPsychologists have studied identical twins and have identified specifi.pdf
Psychologists have studied identical twins and have identified specifi.pdf3rdeyesolutions
 
Pruvided helow are the Iether stades for thiee sectans of MATH 245 tha.pdf
Pruvided helow are the Iether stades for thiee sectans of MATH 245 tha.pdfPruvided helow are the Iether stades for thiee sectans of MATH 245 tha.pdf
Pruvided helow are the Iether stades for thiee sectans of MATH 245 tha.pdf3rdeyesolutions
 
PSLO3 available evidence- A competent nurse utilizes in formation tech.pdf
PSLO3 available evidence- A competent nurse utilizes in formation tech.pdfPSLO3 available evidence- A competent nurse utilizes in formation tech.pdf
PSLO3 available evidence- A competent nurse utilizes in formation tech.pdf3rdeyesolutions
 
Provider of Care - Diagnostic and Patient Monitoring- - Provider of Ca.pdf
Provider of Care - Diagnostic and Patient Monitoring- - Provider of Ca.pdfProvider of Care - Diagnostic and Patient Monitoring- - Provider of Ca.pdf
Provider of Care - Diagnostic and Patient Monitoring- - Provider of Ca.pdf3rdeyesolutions
 
Provide code that achieves the following objectives- 1- -1pt- - Declar.pdf
Provide code that achieves the following objectives- 1- -1pt- - Declar.pdfProvide code that achieves the following objectives- 1- -1pt- - Declar.pdf
Provide code that achieves the following objectives- 1- -1pt- - Declar.pdf3rdeyesolutions
 
Provide the correct terms of values for the following population param.pdf
Provide the correct terms of values for the following population param.pdfProvide the correct terms of values for the following population param.pdf
Provide the correct terms of values for the following population param.pdf3rdeyesolutions
 

More from 3rdeyesolutions (20)

python code plz Task 2 1- Create a list with the digits in your studen.pdf
python code plz Task 2 1- Create a list with the digits in your studen.pdfpython code plz Task 2 1- Create a list with the digits in your studen.pdf
python code plz Task 2 1- Create a list with the digits in your studen.pdf
 
PYTHON - time and space complexity for the next function- def some_fun.pdf
PYTHON - time and space complexity for the next function- def some_fun.pdfPYTHON - time and space complexity for the next function- def some_fun.pdf
PYTHON - time and space complexity for the next function- def some_fun.pdf
 
Python - Explain the concept- and why you found it interesting- How w.pdf
Python -  Explain the concept- and why you found it interesting- How w.pdfPython -  Explain the concept- and why you found it interesting- How w.pdf
Python - Explain the concept- and why you found it interesting- How w.pdf
 
Put the steps of endochondral ossification in the correct order- Your.pdf
Put the steps of endochondral ossification in the correct order- Your.pdfPut the steps of endochondral ossification in the correct order- Your.pdf
Put the steps of endochondral ossification in the correct order- Your.pdf
 
Put the events of HIV infection in the correct order- HIV fuses to the.pdf
Put the events of HIV infection in the correct order- HIV fuses to the.pdfPut the events of HIV infection in the correct order- HIV fuses to the.pdf
Put the events of HIV infection in the correct order- HIV fuses to the.pdf
 
Put the following events in the proper order of occurrence when RIK pa.pdf
Put the following events in the proper order of occurrence when RIK pa.pdfPut the following events in the proper order of occurrence when RIK pa.pdf
Put the following events in the proper order of occurrence when RIK pa.pdf
 
Put an I if the term refers to Innate Immunity Put an A if the term re.pdf
Put an I if the term refers to Innate Immunity Put an A if the term re.pdfPut an I if the term refers to Innate Immunity Put an A if the term re.pdf
Put an I if the term refers to Innate Immunity Put an A if the term re.pdf
 
Pure tone averages (PTAs) give us information about- how well a person.pdf
Pure tone averages (PTAs) give us information about- how well a person.pdfPure tone averages (PTAs) give us information about- how well a person.pdf
Pure tone averages (PTAs) give us information about- how well a person.pdf
 
public class EllipsoidList { private String list- private Array.pdf
public class EllipsoidList {     private String list-    private Array.pdfpublic class EllipsoidList {     private String list-    private Array.pdf
public class EllipsoidList { private String list- private Array.pdf
 
Public Administration -what kind of challenges does the Department of.pdf
Public Administration -what kind of challenges does the Department of.pdfPublic Administration -what kind of challenges does the Department of.pdf
Public Administration -what kind of challenges does the Department of.pdf
 
public class ImpPythTripEx public static double---- triples - new d.pdf
public class ImpPythTripEx    public static double---- triples - new d.pdfpublic class ImpPythTripEx    public static double---- triples - new d.pdf
public class ImpPythTripEx public static double---- triples - new d.pdf
 
public class Integenthalysis public static doumle analyreints(iet max-.pdf
public class Integenthalysis public static doumle analyreints(iet max-.pdfpublic class Integenthalysis public static doumle analyreints(iet max-.pdf
public class Integenthalysis public static doumle analyreints(iet max-.pdf
 
PT ANRJ issues a IDR 450 million IPO priced at IDR 130 per share- and.pdf
PT ANRJ  issues a IDR 450 million IPO priced at IDR 130 per share- and.pdfPT ANRJ  issues a IDR 450 million IPO priced at IDR 130 per share- and.pdf
PT ANRJ issues a IDR 450 million IPO priced at IDR 130 per share- and.pdf
 
Proxemics refers to the- a- the role of videography and photography in.pdf
Proxemics refers to the- a- the role of videography and photography in.pdfProxemics refers to the- a- the role of videography and photography in.pdf
Proxemics refers to the- a- the role of videography and photography in.pdf
 
Psychologists have studied identical twins and have identified specifi.pdf
Psychologists have studied identical twins and have identified specifi.pdfPsychologists have studied identical twins and have identified specifi.pdf
Psychologists have studied identical twins and have identified specifi.pdf
 
Pruvided helow are the Iether stades for thiee sectans of MATH 245 tha.pdf
Pruvided helow are the Iether stades for thiee sectans of MATH 245 tha.pdfPruvided helow are the Iether stades for thiee sectans of MATH 245 tha.pdf
Pruvided helow are the Iether stades for thiee sectans of MATH 245 tha.pdf
 
PSLO3 available evidence- A competent nurse utilizes in formation tech.pdf
PSLO3 available evidence- A competent nurse utilizes in formation tech.pdfPSLO3 available evidence- A competent nurse utilizes in formation tech.pdf
PSLO3 available evidence- A competent nurse utilizes in formation tech.pdf
 
Provider of Care - Diagnostic and Patient Monitoring- - Provider of Ca.pdf
Provider of Care - Diagnostic and Patient Monitoring- - Provider of Ca.pdfProvider of Care - Diagnostic and Patient Monitoring- - Provider of Ca.pdf
Provider of Care - Diagnostic and Patient Monitoring- - Provider of Ca.pdf
 
Provide code that achieves the following objectives- 1- -1pt- - Declar.pdf
Provide code that achieves the following objectives- 1- -1pt- - Declar.pdfProvide code that achieves the following objectives- 1- -1pt- - Declar.pdf
Provide code that achieves the following objectives- 1- -1pt- - Declar.pdf
 
Provide the correct terms of values for the following population param.pdf
Provide the correct terms of values for the following population param.pdfProvide the correct terms of values for the following population param.pdf
Provide the correct terms of values for the following population param.pdf
 

Recently uploaded

This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIShubhangi Sonawane
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 

Recently uploaded (20)

This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 

public class DimmableFloorLamp extends FloorLamp implements Dimmable - (1).pdf

  • 1. public class DimmableFloorLamp extends FloorLamp implements Dimmable { public void turnOff() { System.out.print("Dimmable Off: "); public void turnOn(){ System.out.print("Dimmable On: "); } public void setTo(int value) { System.out.print("Dimmable DimVal:" + value + ": "); } Consider this instantiation code: Room r = new Room ( ) ; DimmableFloorLamp p = new Dimmable(); r . setLamp ( p ) ; r. turnLightOn(); r.turnLightoff(); Will it compile, and if yes, what will it print? a. Dimmable On: Dimmable Off: b. Runtime Error c. Compilation Error d. Dimmable On: Floor Off: e. Lamp On: Dimmable Off: