Answered step by step
Verified Expert Solution
Link Copied!

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 ) .

Q1. 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 class(Student) and set the StudentName and StudentID.
(2 Mark)
Q2. 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 2 years and print the updated Age.
(2 Mark)
Q3. Differentiate between primitive type and object type. Give 2 examples of each.
(2 Mark)
Q4. Draw Class Diagram and Object Diagram from the below given Details.
(2 Marks)
public class University
{
private Student stdob;
private Faculty fctob; }
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions

Question

LO1 Explain how the workforce is changing in unpredicted ways.

Answered: 1 week ago