Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started