0% found this document useful (0 votes)
192 views

MIT World Peace University, Pune Faculty of Science MCA - Trimester I Practical Examination

This document contains instructions for a practical examination for the MCA Trimester I program at MIT World Peace University. It includes 4 questions on C++ programming concepts like arrays, classes, inheritance and database design. The questions cover topics like defining classes with inheritance, calculating class member values, creating relational databases in 3rd normal form with queries, and comparing/manipulating strings and arrays. Sample programs and database schemas are provided as examples. Scoring is provided for each question out of 10 marks.

Uploaded by

ishika tiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
192 views

MIT World Peace University, Pune Faculty of Science MCA - Trimester I Practical Examination

This document contains instructions for a practical examination for the MCA Trimester I program at MIT World Peace University. It includes 4 questions on C++ programming concepts like arrays, classes, inheritance and database design. The questions cover topics like defining classes with inheritance, calculating class member values, creating relational databases in 3rd normal form with queries, and comparing/manipulating strings and arrays. Sample programs and database schemas are provided as examples. Scoring is provided for each question out of 10 marks.

Uploaded by

ishika tiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 20

MIT World Peace University, Pune

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

Private members are:


account number Integer
customer name 20 characters
balance float
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 SavingsAccount from Account class in Banking System with
following specifications:
Private members are:
Interest rate float

Public members are:


WithDraw() Function that allows user to withdraw amount from his account
Deposit() Function that allows user to deposit amount in his account
Override functions AcceptDetails and DisplayDetails in derived class.
3 Consider following entities and their relationships 20
Employee(empno, empname, salary, commission, designation)
Department(deptno, deptname, location)

Employee and Department are related with many-to-one relationship.

Constraints: Primary key, Not null, salary should be > 0.

Create a relational database in 3 NF and construct queries


 Find maximum, minimum and average salary for every designation.
 Find out employees who are working at ‘Pune’ location.
 Print all the employee details whose designation is ‘Accountant’ and
location is ‘Nasik’.
 Print department wise list of employees.
4 Viva 10
MIT World Peace University, Pune
Faculty of Science
MCA – Trimester I
Practical Examination

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

Private members are:


employee id Integer
employee name 20 characters
salary float
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 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)

Property and Owner are related with many-to-one relationship.

Property and district are related with many-to-one relationship.

Constraints: Primary key Pnumber should be > 0.

Create a relational database in 3 NF and construct queries


 List the name of owner, property name, and district in which the property
is situated.
 List all properties in “Nashik” district.
 Display the total property area owned by “mr. Dev” in “Sangli” district.
 List district wise properties of owner along with area & tax rate.
4 Viva 10

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

Private members are:


faculty id Integer
faculty name 20 characters
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 VisitingFaculty from Faculty class in the Faculty


Management System with following specifications:

Private members are:


no of hours float
rate float
Public members are:
CalculatePayment Function that calculates the salary of the Visiting Faculty
by the formula: total payment = rate * no of hours
Override the functions AcceptDetails and DisplayDetails in derived class.
3 Consider the following Entities & Relationships 20
Movie (mvno,mvname,releaseyear)
Actor (actno,actname)

The relation between Movie & Actor is many-to-many

Constraints : Primary Key Releaseyear should be > 0.

Create a RDB in 3NF & construct queries in SQL Server/Oracle 8i Onwards


 Count the number of movies in which ‘salman’ has acted.
 Display the movie details having more than 5 actors.
 Find all movies of ‘amitabh’ that are released between the years 1965
and 1980 and starting with letter ‘K’.
 Print actor wise list of movies along with release year & movie name.

4 Viva 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

Override the functions AcceptDetails and DisplayDetails in derived class.


3 Consider the following Entities & Relationships 20
Student (rollno, name, marks)
Teacher (tno, tname)

The relation between student & teacher is many-to-many with descriptive attribute
class.

Constraints: Primary Key Class has to be FY, SY or TY.

Create a RDB in 3NF & construct queries in SQL Server/Oracle 8i Onwards


 List the student to whom Mr.Deshmukh is teaching more than two
subjects.
 List all T.Y. students who have scored distinction in a subject taught by
Mr.patil.
 List all teachers teaching Data Structures.
 Count class wise number of students.
4 Viva 10

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)

The relation between book & author is many-to-many.

Constraints: Primary Key Author name & publisher name should not be null.

Create a RDB in 3NF & construct queries in SQL server.


 Find the author whose more than 2 books are published by ‘PHI publication’.
 Count the number of books of each publisher.
 List all books written by ‘Korth’.
 List books along with publisher name.
4 Viva 10

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)

The relation between book & dealer is many-to-one.

The relation between book & dept is many-to-one.

Constraints: Primary Key Price should be greater than 0. Foreign key.

Create a RDB in 3NF & construct queries in SQL Server/Oracle 8i Onwards


 Print department wise expenditure on books.
 Give the name of dept spending maximum amount on books.
 List name of dept to whom ‘Tata Mg-Hill’ has supplied books.
 List the names & prices of books bought for ‘comp’ department.
4 Viva 10

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

Private members are:


employee id Integer
employee name 20 characters
MIT World Peace University, Pune
Faculty of Science
MCA – Trimester I
Practical Examination
salary float
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 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)

Machine & Parts are related with one-to-many relationship.

Constraints : Primary Key constraints, machine name not null, foreign key

Create a RDB in 3NF & construct the queries in SQL Server/Oracle


 Increase the cost of machine by 10%.
 Display the machine details of various machines along with their respective
parts.
 List all parts whose machine cost is less than 20000.
 Display all machine names with the number of parts that each machine
requires.
4 Viva 10

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

Private members are:


faculty id Integer
faculty name 20 characters
Public members are:
MIT World Peace University, Pune
Faculty of Science
MCA – Trimester I
Practical Examination
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 VisitingFaculty from Faculty class in the Faculty


Management System with following specifications:

Private members are:


no of hours float
rate float
Public members are:
CalculatePayment Function that calculates the salary of the Visiting
Faculty by the formula: total payment = rate * no of
hours
Override the functions AcceptDetails and DisplayDetails in derived class.
3 Consider the following Entities & Relationships 20
Student (sno,sname,addr,class)
Subject (sub_no,sub_name)

Students & subjects are related with many-to-many with attribute marks.

Constraints: Primary key constraints and sname not null.

Create a RDB in 3NF & construct the queries in SQL Server/Oracle


 Find the name of student who had opted for the subject of ”Computer
Science”
 Find the number of students having the address as ”Pimpri” and marks
is>55.
 Find the total number of students of Mumbai for the subject ‘Organic
Chemistry’.
 List subjects with minimum number of students registered for subject.
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 10


function. Strings should be accepted from the user. Display the concatenated
string.
2 Define a class called Person with following specifications: 10
Private members are:
name 20 characters
age 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 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
Country (con-code,name,capital)
Population (pop-code,population)

Country & population are related with one-to-one relationship.

Constraints : Primary key and country name not null

Create a RDB in 3NF & construct the queries in SQL Server/Oracle


 List the country with highest population.
 Give name & population of country whose capital is “Tokyo”.
 Give name of deserted countries.
 List country wise population.
4 Viva 10
MIT World Peace University, Pune
Faculty of Science
MCA – Trimester I
Practical Examination
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.

2 Define a class called Player with following specifications: 10


Private members are:
player code Integer
player name 20 characters
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

Override the functions AcceptDetails and DisplayDetails in derived class.


3 Consider the following Entities & Relationships 20
Wholesaler (wno, wname, addr, city)
Product (pno, pname)

Wholesaler & product are related with many-to-many relationship.

Constraints : Primary key and pname not null

Create a RDB in 3NF & construct the queries in SQL Server/Oracle


 List the wholesalers of product “Books”.
 Count the number of wholesalers in city “Mumbai”
 Print wholesaler wise list of products.
 Delete record of wholesaler where product is “Mouse”.
4 Viva 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.
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.

Create a RDB in 3NF & construct the queries in SQL Server/Oracle


 Increase the rate by 10% for the item name “Keyboard”.
 List the suppliers who are of same city but supply different items.
 List supplier wise items supplied.
 List the item details of items who have maximum discount and rate > 4000.
4 Viva 10

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

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 WholeSaleProduct from Product class in ProductManagement


System with following specifications:
Private members are:
discount float (in percentage)
price float

Public members are:


CalculatePrice Function that accepts the number of items from the user and
calculates the total price of the items by the formula:
total = (price * number of items) * (discount / 100)
Override the functions AcceptDetails and DisplayDetails in derived class.
3 Consider the following Entities & Relationships 20
Customer (cno,name,addr)
Quotation (qno,desc,amt_quoted)

Customer & quotation are related with many-to-many.

Constraints: Primary key Customer name Not NULL. Qno >100

Create a RDB in 3NF & construct the queries in SQL Server/Oracle


 List the customers who want to purchase “Fridge”.
 Find the number of customers who are demanding more than one item &
their total amount.
 List all the customers whose address is Mumbai and have more than 4
quotations.
 List customer wise quotations.
4 Viva 10

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

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 SavingsAccount from Account class in Banking System with
following specifications:
Private members are:
Interest rate float

Public members are:


WithDraw() Function that allows user to withdraw amount from his account
Deposit() Function that allows user to deposit amount in his account

Override functions AcceptDetails and DisplayDetails in derived class.


3 Consider the following Entities & Relationships 20
Politician (pno, pname, pdesc, constituency)
party (party_code,party_name)
Politician & party are related with many-to-one.

Constraints : Primary key, Foreign key ,Party_name Not NULL

Create a RDB in 3NF & construct the queries in SQL Server/Oracle


 List all politicians of party “BJP”.
 Count the number of politician having political description as “MP” and
constituency is North Delhi.
 Count the total number of politicians for each party.
 List party wise politician names along with their constituency.
4 Viva 10

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

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 WholeSaleProduct from Product class in


ProductManagement System with following specifications:
Private members are:
discount float (in percentage)
price float

Public members are:


CalculatePrice Function that accepts the number of items from the user and
calculates the total price of the items by the formula:
total = (price * number of items) * (discount / 100)
Override the functions AcceptDetails and DisplayDetails in derived class.
3 Consider the following Entities & Relationships 20
Doctor (dno, dname, address, city)
Hospital (hno, hname, street, hcity)

Hospital and Doctor are related with many-to-many.

Constraints : Primary key ,Address not null

Create a RDB in 3NF & construct the queries in SQL Server/Oracle


 Find the no. of hospitals every doctor is visiting.
 Find the doctors visiting those hospitals that are in the same city in which
they live.
 Display the count of the doctors visiting hospitals on JM Road.
 List hospital wise doctors.
4 Viva 10

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

Private members are:


employee id Integer
employee name 20 characters
MIT World Peace University, Pune
Faculty of Science
MCA – Trimester I
Practical Examination
salary float
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 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)

Car & Driver are related with many-to-many.

Car & Accident one-to-many.

Constraints : Primary key ,Foreign key, Accident year> 1900

Create a RDB in 3NF & construct the queries in SQL Server/Oracle


 List all accidents along with their place & cars involved in those accidents that
took place in 2000.
 List the drivers involved in accidents that took place in “Pune”.
 Find the Place and year of accident that involved “Maruti-800”.
 Display he driver names and the owner names of the cars which had accidents
on Pune Nagar road.
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 Faculty with following specifications: 10

Private members are:


faculty id Integer
faculty name 20 characters
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 VisitingFaculty from Faculty class in the Faculty


Management System with following specifications:

Private members are:


no of hours float
rate float
Public members are:
CalculatePayment Function that calculates the salary of the Visiting Faculty
by the formula: total payment = rate * no of hours
Override the functions AcceptDetails and DisplayDetails in derived class.
3 Consider the following Entities & Relationships 20
Doctor (dno, dname, address, city)
Patient (opdno, pat_name, addr, disease)

Patient and Doctor are related with many-to-many with descriptive attribute
no_of_visits.

Constraints : Primary key , Address not null and no_of_visits <> 0

Create a RDB in 3NF & construct the queries in SQL Server/Oracle


 Find the no. of patients visited by “Dr.Apte”.
 Find the names of patients having “Cancer” and are visited by Mr Gandhi
for more than 10 times.
 Find the no. of Patients suffering from “Asthama”.
 List doctor wise patients.
4 Viva 10
MIT World Peace University, Pune
Faculty of Science
MCA – Trimester I
Practical Examination
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.
2 Define a class called Player with following specifications: 10
Private members are:
player code Integer
player name 20 characters
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

Override the functions AcceptDetails and DisplayDetails in derived class.


3 Consider the following Entities & Relationships 20
client (client-no, name, address, birth-date)
policy-info (policy-no, description, maturity amount, premium amt,
policy-intro-date, Maturity_date)

client and policy are related with one to many relationship.

Constraints: Primary key, foreign key

Create a RDB in 3NF & construct the queries in SQL Server/Oracle


 List the names of the clients with policy date after 31st December 2012
 List the policies with highest premium amount.
 List all the clients having maturity amount > 1000000 and born in the
month of November.
 Display all policies in ascending order of intro date.
4 Viva 10
MIT World Peace University, Pune
Faculty of Science
MCA – Trimester I
Practical Examination
1 Write a C++ program to multiply each element of 1D array by 5 and display 10
the array. 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
age 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 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.

Constraints: Primary key, foreign key

Create a RDB in 3NF & construct the queries in SQL Server/Oracle


 List names of player playing more than 2 games.
 List the games along with the captain name having more than 2 coaches
 List the names of games that require more than 5 players
 Display player names with their coach names.
4 Viva 10

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

Private members are:


account number Integer
customer name 20 characters
balance float

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 SavingsAccount from Account class in Banking


System with following specifications:
Private members are:
Interest rate float

Public members are:


WithDraw() Function that allows user to withdraw amount from his
account
Deposit() Function that allows user to deposit amount in his account
Override functions AcceptDetails and DisplayDetails in derived class.
3 Consider the following entities & relationships 20
Donor (donor-no, name, city)
Blood (blood-id, bloodgroup, quantity, Rhfactor, date-of-collection)

Relation between the blood & donor is many-to-one.

Constraints : Primary key, foreign key, bloodgroup not null

Create a RDB in 3NF & construct the queries in SQL Server/Oracle


 Display number of donors who donated blood on 11th April 2008
 List the names of donors and their cities who donated A RH -ve
 Display quantity of every blood group collected on 31st Jan 2007.
 Display donor wise list of blood groups.
4 Viva 10

You might also like