SIR SYED UNIVERSITY OF ENGINEERING & TECHNOLOGY
SOFTWARE CONSTRUCTION & DEVELOPMENT
LAB # 08
Mutability and Immutability
Objective: Understanding and implementing the concept of mutability and immutability.
Apply concept of mutability and immutability for the task promoted and failed students.
The roll number, subject code, and subject name would have to be entered at time of object
creation and with getter method these variables should be printed. (Hint: Those students
who are failed in previous semester will be registered in immutable class, and promoted
students are registered in mutable class)
Source Code:
• Mutable Class
Immutable Class:
Name : [Link] Khan Roll No 2019-SE-271 Section : F Page | 1
SIR SYED UNIVERSITY OF ENGINEERING & TECHNOLOGY
SOFTWARE CONSTRUCTION & DEVELOPMENT
1. Main Class:
Output:
Name : [Link] Khan Roll No 2019-SE-271 Section : F Page | 2