Question: Q 1 . Create a class named Student with the fields: StudentName, StudentID, Age and MobileNo ( data types are String and int ) .
Q Create a class named Student with the fields: StudentName, StudentID, Age and MobileNo data types are String and int Declare an empty and a parameterized Constructor for classStudent and set the StudentName and StudentID.
Mark
Q Declare an accessor method PrintStudent in Student class to display student details, and a mutator method UpdateAge to increase the Age of a student by years and print the updated Age.
Mark
Q Differentiate between primitive type and object type. Give examples of each.
Mark
Q Draw Class Diagram and Object Diagram from the below given Details. Marks
public class University
private Student stdob;
private Faculty fctob;
Q From the given class diagram and object diagram, write a code snippet to show objects creating objects.
Mark
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
