Exam Details

Subject c++ laboratory
Paper
Exam / Course m.sc. information technology
Department
Organization Alagappa University Distance Education
Position
Exam Date May, 2018
City, State tamil nadu, karaikudi


Question Paper

DISTANCE EDUCATION
M.Sc. DEGREE EXAMINATION, MAY 2018.
LABORATORY
(2002 Onwards)
Time Three hours Maximum 100 marks
One question should be given to each candidate by
LOT system.
1. Write a temperature conversion program that gives
the user the option of converting Fahrenheit to
celcius or celeius to Fahrenheit. Use floating point
numbers to carry out the conversion.
Write a program in that emulates the DOS
copy command.
2. Create a class called TIME that has integer data
elements for hours, minutes and seconds. The
constructors should initialize these data elements to
specified value, if given, otherwise to O.A member
function should display it, in 11:50:45 format.
Write a program to create a four function
(addition, subtraction, multiplication and division)
calculator.
Sub. Code
16
Cut here
DE-7027
2
sp4
3. Assumes you want to generate a table of multiples
of any given number. Write a program that allows
the user to enter the number and then generates
the table, formatting it into ten columns and 20
lines.
Create a class AINT to overload all five integer
arithmetic operators and so that they
operate on object of type int.
4. Using pointers to create a class and write a program
to get the n names and display them in sorted order.
Create a class for a stock item. It should have
the attributes of stock levels and unit price. Define
the methods to return the values of these two
attributes and to set them using parameters. And
two more methods to allow stock receipts and
issues. Write a menu driven program to do the
above task.
5. Imagine a publishing company that makes both
books and audio-cassette versions of its works.
Create a class publication that stores the title and
price of a publication. From this class derive two
classes
Book which adds a page count and
TAPE Which adds a length count
Cut here
Cut here
DE-7027
3
sp4
Each of these three classes should have a getdata(
function to get its data from the user and a
putdata( function to display its data. Write a
main( program to test the book and tape classes by
creating instances of them asking the user to fill in
their data with getdata( and then displaying the
data with putdata(
Write a program using friend function frifun(
which can act on the classes alpha and beta. Using
constructors fix the values for alpha and beta.
6. Write a menu driven program to add, subtact and
multiply the given matrices of order n x n .
Write a program using polymorphism to calculate
the square of any two numbers of type int, float,
double and long.
7. Raising a number n to power p is the same as
multiplying by itself P times. Write a function
power( that takes a double value for n and an int
value for P and returns the result as double value.
Use default argument of 2 for so that if this
argument is omitted, the number will be squared.
Write a main( function that gets values from the
user to test this function.
Write a program that reads a group of numbers
from the user and places them in array of type float.
Once the numbers are sorted in the array, the
program should average them and print the result.
Use pointer notation whenever possible.
DE-7027
4
sp4
8. Create a class called EMP that contains a name and
an employee number. Include a member function
called getdata( to get data from the user, another
function called putdata( to display the data. Write
a main( program to exercise this class.
Write a program which will accept a string of 10
characters in length from the key board and count
the occurrences of each of the five vowels in the
string. The output should be in a neat format.



Subjects

  • c++ laboratory
  • computer networks
  • data structures – laboratory
  • data structures and algorithms
  • internet programming – laboratory
  • internet programming and web design
  • multimedia applications
  • object oriented dbms
  • object oriented programming and c++
  • operating systems
  • principles of information technology
  • software engineering
  • visual programming
  • visual programming – laboratory