3rd Sem, IT

BTITL307: Object Oriented Paradigm With C++ Lab Syllabus for IT 3rd Sem 2018-19 DBATU

Object Oriented Paradigm With C++ Lab detailed syllabus scheme for B.Tech Information Technology (IT), 2018-19 onwards has been taken from the DBATU official website and presented for the Bachelor of Technology students. For Subject Code, Course Title, Lecutres, Tutorials, Practice, Credits, and other information, do visit full semester subjects post given below.

For all other DBATU Syllabus for Information Technology 3rd Sem 2018-19, do visit IT 3rd Sem 2018-19 Onwards Scheme. The detailed syllabus scheme for object oriented paradigm with c++ lab is as follows.

Object Oriented Paradigm With C++ Lab Syllabus for Information Technology (IT) 2nd Year 3rd Sem 2018-19 DBATU

Prerequisites:

For the complete syllabus, results, class timetable, and many other features kindly download the iStudy App
It is a lightweight, easy to use, no images, and no pdf platform to make students’s lives easier.
Get it on Google Play.

Lab Experiments Objective:

  1. Programming using C++

Lab Experiments List:

  1. Raising a number n to a power p is the same as multiplying n by itself p times. Write a function called power () that takes a double value for n and an int value for p, and returns the result as double value. Use a default argument of 2 for p, 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.
  2. A point on the two-dimensional plane can be represented by two numbers: an X coordinate and a Y coordinate. For example, (4,5) represents point 4 units to the right of the origin along the X axis and 5 units up the Y axis. The sum of two points can be defined as a new point whose X coordinate is the sum of the X coordinates of the points and whose Y coordinate is the sum of their Y coordinates. Write a program that uses a structure called point to model a point. Define three points, and have the user input values to two of them. Then set the third point equal to the sum of the other two, and display the value of the new point. Interaction with the program might look like this:
  3. Enter coordinates for P1: 3 4

    Enter coordinates for P2: 5 7

    Coordinates of P1 + P2 are: 8, 11

    Create the equivalent of a four-function calculator. The program should request the user to enter a number, an operator, and another number. It should then carry out the specified arithmetical operation: adding, subtracting, multiplying, or dividing the two numbers. (It should use a switch statement to select the operation). Finally, it should display the result. When it finishes the calculation, the program should ask if the user wants to do another calculation. The response can be Y or N. Some sample interaction with the program might look like this:

    Enter first number, operator, second number: 10/ 3

    Answer = 3.333333

    Do another (Y/ N)? Y

    Enter first number, operator, second number 12 + 100

    Answer = 112

    Do another (Y/ N)? N

  4. A phone number, such as (212) 767-8900, can be thought of as having three parts: the area code (212), the exchange (767) and the number (8900). Write a program that uses a structure to store these three parts of a phone number separately. Call the structure phone. Create two structure variables of type phone. Initialize one, and have the user input a number for the other one. Then display both numbers. The interchange might look like this:
  5. Enter your area code, exchange, and number: 415 555 1212

    My number is (212) 767-8900

    Your number is (415) 555-1212

    Create two classes DM and DB which store the value of distances. DM stores distances in meters and centimeters and DB in feet and inches. Write a program that can read values for the class objects and add one object of DM with another object of DB. Use a friend function to carry out the addition operation. The object that stores the results maybe a DM object or DB object, depending on the units in which the results are required. The display should be in the format of feet and inches or meters and centimeters depending on the object on display.

  6. Create a class rational which represents a numerical value by two double values-NUMERATOR and DENOMINATOR. Include the following public member Functions: constructor with no arguments (de-fault), constructor with two arguments, void reduce () that reduces the rational number by eliminating the highest common factor between the numerator and denominator.
  7. Overload + operator to add two rational numbers

    Overload – operator to enable input through cin

    Overload * operator to enable output through cout Write a main ( ) to test all the functions in the class.

  8. Consider the following class definition: class father {
  9. protected age; public;

    father (int

    1. {age = x;}

    virtual void iam()

    {

    cout<<"I AM THE FATHER";

    cout << "My age is : " <<age<< endl;}

    };

    Derive the two classes son and daughter from the above class and for each, define iam () to write similar but appropriate messages. You should also define suitable constructors for these classes. Now, write a main() that creates objects of the three classes and then calls iam ( ) for them. Declare pointer to father. Successively, assign addresses of objects of the two derived classes to this pointer and in each case, call iam () through the pointer to demonstrate polymorphism in action.

  10. Write a program that creates a binary file by reading the data for the students from the terminal. The data of each student consist of roll number, name (a string of 30 or lesser number of characters) and marks.
  11. A hospital wants to create a database regarding its indoor patients. The information to store
  12. include

    Name of the patient

    Date of admission

    Disease

    Date of discharge
    Create a structure to store the date (year, month and date as its members). Create a base class to store the above information. The member function should include functions to enter information and display a list of all the patients in the database. Create a derived class to store the age of the patients. List the information about all the patients to store the age of the patients. List the information about all the pediatric patients (less than twelve years in age).

  13. Imagine a tollbooth with a class called toll Booth. The two data items are a type Unsigned Int to hold the total number of cars, and a type double to hold the total amount of money collected. A constructor initializes both these to
  14. A member function called payingCar ( ) increments the car total and adds 0.50 to the cash total. Another function called nopayCar( ), increments the car total but adds nothing to the cash total. Finally, a member function called display() displays the two totals i.e. total cars and total cash. Include a program to test this class. This program should allow the user to push one key to count a paying car, and another to count a nonpaying car. Pushing the ESC key should cause the program to print out the total cars and total cash and then exit.

For detail syllabus of all other subjects of Information Technology (IT) 3rd Sem 2018-19 regulation, visit IT 3rd Sem Subjects syllabus for 2018-19 regulation.

Leave a Reply

Your email address will not be published. Required fields are marked *

*