0% found this document useful (0 votes)
2 views2 pages

Exp - 6B InnerClass

The document outlines an Object Oriented Programming lab experiment for first-year students at SVKM’s NMIMS, focusing on the implementation of inner classes. Students are required to create a SmartHome class with an inner RemoteControl class that toggles device states, and submit their executed code along with observations. Additionally, it includes questions about inner classes and their characteristics.

Uploaded by

jneel905
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Exp - 6B InnerClass

The document outlines an Object Oriented Programming lab experiment for first-year students at SVKM’s NMIMS, focusing on the implementation of inner classes. Students are required to create a SmartHome class with an inner RemoteControl class that toggles device states, and submit their executed code along with observations. Additionally, it includes questions about inner classes and their characteristics.

Uploaded by

jneel905
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

SVKM’s NMIMS

Mukesh Patel School of Technology Management & Engineering /


School of Technology Management & Engineering

B. Tech/MBA Tech Lab and Workbook AY- 2025-26

Year:-First Subject:- Object Oriented Programming Lab Semester:-Second

Experiment: 7
PART B

(PART A: TO BE COMPLETED AND SUBMITTED BY STUDENTS)

Students must execute all the programs, write executed code in the workbook, and submit
part B of experiment 7 on the student portal. The filename should be
OOPL_batch_rollno_experimentno. Example: OOPL_A1_E001_E7

Roll No.: Name:


Prog/Yr/Sem: Batch:
Date of Experiment: Date of Submission:

Aim: Implement programs to demonstrate the use of inner classes

Problem Statement:
A smart home system has multiple devices, such as lights and fans, controlled by a remote.
Each remote has a power button to toggle the device on or off.

Tasks:

1. Create a class SmartHome that contains an inner class RemoteControl.


2. RemoteControl should have a method toggleDevice() that switches the device state
(ON/OFF).
3. Simulate controlling a device using the inner class.

Expected outcome:

Device is currently OFF

Turning ON the device...

Device is now ON
SVKM’s NMIMS
Mukesh Patel School of Technology Management & Engineering /
School of Technology Management & Engineering

B. Tech/MBA Tech Lab and Workbook AY- 2025-26

Year:-First Subject:- Object Oriented Programming Lab Semester:-Second

Executed Code, Input and Output


1. Implement programs to demonstrate the use of inner classes
Executed Code: -
// Paste the executed code here

Input Output: -
// Paste the input/output of executed code

Observation and Learning: -


- You should include your personalized concluding remarks aligned with the learning
outcomes outlined in PART A.

Question of curiosity:

1. What are inner classes?


2. Are private or static classes allowed? If so, how can they be implemented?

You might also like