MIT World Peace University, Pune Faculty of Science MCA - Trimester I Practical Examination
MIT World Peace University, Pune Faculty of Science MCA - Trimester I Practical Examination
Faculty of Science
MCA – Trimester I
Practical Examination
1 Write a C++ program to find the largest and smallest number in a 1D array. 10
Elements of the array should be accepted from the user.
2 Define a class called Account with following specifications: 10
Derive a class called SavingsAccount from Account class in Banking System with
following specifications:
Private members are:
Interest rate float
1 Write a C++ program to swap the first and last element in an integer 1D array. 10
Elements of the array should be accepted from the user.
2 Define a class called Person with following specifications: 10
Private members are:
name 20 characters
adhar card no integer
Public members are:
AcceptDetails() Function that allows user to enter the
values for all data members
DisplayDetails() Function that displays data for all data members.
Derive a class called Student from Person class in School Exam System with
following specifications:
Private members are:
science float (marks out of 100)
maths Float (marks out of 100)
english float (marks out of 100)
total float
percentage float
Public members are:
CalculateMarks Function that calculates the total marks of the student and
his percentage by the formula:
total = science + maths + english
percentage = (total * 100)/ 300
Override the functions AcceptDetails and DisplayDetails in derived class.
3 Consider following entities and their relationships 20
Employee(empno, name, address, city, deptname)
Project(pno, pname, status)
Employee and Project are related with many-to-many relationship with attribute
- no of days employee worked on that project.
Create a relational database in 3 NF and construct queries
Constraints: Primary key.
Project status Constraints: C - completed
P – Progressive
I - Incomplete
Create a relational database in 3 NF and construct queries
List project wise names of employees along with project status.
List the name of employee worked on any project more than 50 days.
List the name of employee working on project having status
“progressive”.
List the project name and total no of employees worked in projects that
are ‘incomplete’.
4 Viva 10
MIT World Peace University, Pune
Faculty of Science
MCA – Trimester I
Practical Examination
1 Write a C++ program to concatenate two strings using built-in library function. 10
Strings should be accepted from the user. Display the concatenated string.
2 Define a class called Employee with following specifications: 10
Derive a class called SalesPerson from Employee class in Payroll System with
following specifications:
Private members are:
sales float
commission float
Public members are:
CalculateSalary Function that calculates the salary of the Sales Person by
the formula: total salary = salary + (sales * commission)
Override the functions AcceptDetails and DisplayDetails in derived class.
3 Consider following entities and their relationships 20
Property(pnumber, description, area)
District (dcode, dname, tax-rate)
Owner (oname, address, phone)
1 Write a C++ program to accept two strings. Compare two strings alphabetically 10
using built-in library function. Display the string that is smaller.
MIT World Peace University, Pune
Faculty of Science
MCA – Trimester I
Practical Examination
2 Define a class called Faculty with following specifications: 10
1 Write a C++ program to multiply each element of 1D array by 5 and display the array. 10
Elements of the array should be accepted from the user.
2 Define a class called Player with following specifications: 10
Private members are:
player code Integer
player name 20 characters
MIT World Peace University, Pune
Faculty of Science
MCA – Trimester I
Practical Examination
Public members are:
AcceptDetails() Function that allows user to enter the
values for all data members
DisplayDetails() Function that displays data for all data members.
Derive a class called Bowler from Player class for the Cricket System with following
specifications:
Private members are:
total runs given integer
No. of overs integer
average float
Public members are:
CalculateAverage Function that calculates the average of the bowler by the
formula: average = total runs given/ no. of overs
The relation between student & teacher is many-to-many with descriptive attribute
class.
1 Write a C++ program to accept a string from the user and count the number of 10
spaces and vowels in the string.
2 Define a class called Person with following specifications: 10
Private members are:
name 20 characters
MIT World Peace University, Pune
Faculty of Science
MCA – Trimester I
Practical Examination
adhar card no integer
Public members are:
AcceptDetails() Function that allows user to enter the
values for all data members
DisplayDetails() Function that displays data for all data members.
Derive a class called Student from Person class in School Exam System with following
specifications:
Private members are:
science float (marks out of 100)
maths Float (marks out of 100)
english float (marks out of 100)
total float
percentage float
Public members are:
CalculateMarks Function that calculates the total marks of the student and
his percentage by the formula:
total = science + maths + english
percentage = (total * 100)/ 300
Override the functions AcceptDetails and DisplayDetails in derived class.
3 Consider the following Entities & Relationships 20
Book (bookno, name, pubname)
Author (authorno, author_name)
Constraints: Primary Key Author name & publisher name should not be null.
1 Write a C++ program to accept two strings from the user. Copy one string into 10
another using built-in library function. Display both the strings.
2 Define a class called Person with following specifications: 10
Private members are:
name 20 characters
age integer
MIT World Peace University, Pune
Faculty of Science
MCA – Trimester I
Practical Examination
Public members are:
AcceptDetails() Function that allows user to enter the
values for all data members
DisplayDetails() Function that displays data for all data members.
Derive a class called Patient from Person class in Hospital Management System with
following specifications:
Private members are:
Number of days integer
Rate of room float
hospital medical bill float
Total Bill float
Public members are:
CalculateBill Function that calculates the total bill of the patient by the
formula:
total = hospital medical bill + (number of days * rate)
Override the functions AcceptDetails and DisplayDetails in derived class.
3 Consider the following Entities & Relationships 20
Book (bno, bname, price)
Dealer (dno, dname, addr)
Dept (deptno, deptname, head)
1 Write a C++ program to find the largest and smallest number in a 1D array. Elements 10
of the array should be accepted from the user.
2 Define a class called Employee with following specifications: 10
Derive a class called SalesPerson from Employee class in Payroll System with
following specifications:
Private members are:
sales float
commission float
Public members are:
CalculateSalary Function that calculates the salary of the Sales Person by
the formula: total salary = salary + (sales * commission)
Override the functions AcceptDetails and DisplayDetails in derived class.
3 Consider the following Entities & Relationships 20
Machine (mno, name, mtype, mcost)
Part (pno, pname, pdesc)
Constraints : Primary Key constraints, machine name not null, foreign key
1 Write a C++ program to swap the first and last element in an integer 1D 10
array. Elements of the array should be accepted from the user.
2 Define a class called Faculty with following specifications: 10
Students & subjects are related with many-to-many with attribute marks.
Derive a class called Bowler from Player class for the Cricket System with following
specifications:
Private members are:
total runs given integer
No. of overs integer
average float
Public members are:
CalculateAverage Function that calculates the average of the bowler by the
formula: average = total runs given/ no. of overs
1 Write a C++ program to multiply each element of 1D array by 5 and display the array. 10
Elements of the array should be accepted from the user.
MIT World Peace University, Pune
Faculty of Science
MCA – Trimester I
Practical Examination
2 Define a class called Person with following specifications: 10
Private members are:
name 20 characters
adhar card no integer
Public members are:
AcceptDetails() Function that allows user to enter the
values for all data members
DisplayDetails() Function that displays data for all data members.
Derive a class called Student from Person class in School Exam System with following
specifications:
Private members are:
science float (marks out of 100)
maths Float (marks out of 100)
english float (marks out of 100)
total float
percentage float
Public members are:
CalculateMarks Function that calculates the total marks of the student and
his percentage by the formula:
total = science + maths + english
percentage = (total * 100)/ 300
Override the functions AcceptDetails and DisplayDetails in derived class.
3 Consider the following Entities & Relationships 20
Item (item_no,name,quantity)
Sup(no,name,addr,city,phone)
Item & sup are related with many-to-many relationships with rate ,discount.
Constraints: Primary key and item qty > 5 and rate > 0.
1 Write a C++ program to accept a string from the user and count the number of 10
spaces and vowels in the string.
MIT World Peace University, Pune
Faculty of Science
MCA – Trimester I
Practical Examination
2 Define a class called Product with following specifications: 10
Private members are:
product code integer
name 20 characters
1 Write a C++ program to accept two strings from the user. Copy one string into 10
another using built-in library function. Display both the strings.
2 Define a class called Account with following specifications: 10
MIT World Peace University, Pune
Faculty of Science
MCA – Trimester I
Practical Examination
Private members are:
account number Integer
customer name 20 characters
balance float
Derive a class called SavingsAccount from Account class in Banking System with
following specifications:
Private members are:
Interest rate float
1 Write a C++ program to find the largest and smallest number in a 1D array. 10
Elements of the array should be accepted from the user.
2 Define a class called Product with following specifications: 10
Private members are:
product code integer
MIT World Peace University, Pune
Faculty of Science
MCA – Trimester I
Practical Examination
name 20 characters
1 Write a C++ program to swap the first and last element in an integer 1D array. 10
Elements of the array should be accepted from the user.
2 Define a class called Employee with following specifications: 10
Derive a class called SalesPerson from Employee class in Payroll System with
following specifications:
Private members are:
sales float
commission float
Public members are:
CalculateSalary Function that calculates the salary of the Sales Person by
the formula: total salary = salary + (sales * commission)
Override the functions AcceptDetails and DisplayDetails in derived class.
3 Consider the following Entities & Relationships 20
Car (cno,carmodel,ownername)
Driver (drvno, drvname, drvaddr, drvcity)
Accident (ac_id, place, year)
1 Write a C++ program to concatenate two strings using built-in library function. 10
Strings should be accepted from the user. Display the concatenated string.
2 Define a class called Faculty with following specifications: 10
Patient and Doctor are related with many-to-many with descriptive attribute
no_of_visits.
Derive a class called Bowler from Player class for the Cricket System with
following specifications:
Private members are:
total runs given integer
No. of overs integer
average float
Public members are:
CalculateAverage Function that calculates the average of the bowler by the
formula: average = total runs given/ no. of overs
Derive a class called Patient from Person class in Hospital Management System
with following specifications:
Private members are:
Number of days integer
Rate of room float
hospital medical bill float
Total Bill float
Public members are:
CalculateBill Function that calculates the total bill of the patient by the
formula:
total = hospital medical bill + (number of days * rate)
Override the functions AcceptDetails and DisplayDetails in derived class.
3 Consider the following entities & relationships. 20
Game (name, no-of-players, captain_name)
Players (name, address, clubname)
Game and Player are related with many – to – many relatioship with descriptive
attribute coach_name.
1 Write a C++ program to accept a string from the user and count the number of 10
MIT World Peace University, Pune
Faculty of Science
MCA – Trimester I
Practical Examination
spaces and vowels in the string.
2 Define a class called Account with following specifications: 10