X hits on this document

120 views

0 shares

0 downloads

0 comments

11 / 32

3.

Define two classes to store distance. One of the classes should store distance in centimeters and meters and other should store distance in feet’s and inches. Read two distances, one for each class and compute sum or difference between them as per the user's choice. Display answer in the unit provided by user. Use friend function, function overloading, default values, constructors etc

4.

Write C++ program for the following.

A bag consists of zero or more objects of the same type. Each object can be described by its color and weight. Design C++ program to create a new object. This can be done in two ways. If the user provides information about color and/or weight of the object to be created then this information will be used to create the object otherwise the object will be created using default values for these attribute(s). Provide a facility to keep track of total number of objects and total weight of objects in the bag at a given time. Also provide facility to delete an object from a bag. Use static variable and functions.

5.

Write a C++ program to perform String operations

i.

= Equality

ii.

== String Copy

iii.

+ Concatenation

iv.

<< To display a string

v.

>> To reverse a string

vi.

Function to determine whether a string is a palindrome

vii.

To find occurrence of a sub-string. Use Operator Overloading.

6.

Write C++ program using three classes as

a.

Student’s personal information (name, address, phone, birth date etc)

b.

Student’s academic information (Xth, XIIth and Graduation)

c.

Student’s other information (project done, seminar, hobbies, sports record etc)

Use multiple inheritance and print bio-data of a particular student

7.

Create a simple “shape” hierarchy.  A base class called shape and derived classes called circle, square and triangle. In the base class write a virtual function “draw” and override this in derived classes.

8.

Consider a bookshop that sells both books and tapes. Book is having title and number of pages and cost. Tape has time and cost. Using virtual functions, print the required information about book or tape. Use files to store information.

9.

Write a C++ program to perform matrix operation using Templates.

Group C:

1.

Represent a polynomial using array and write a menu driven program to perform addition, multiplication and evaluation.

2.

Implement stack as an ADT. Use this ADT to perform expression conversion and evaluation. (Infix – Postfix, Infix-Prefix, Prefix-Infix, Prefix-Postfix, Postfix-Infix, Postfix-Prefix).

3.

Implement circular queue and double ended queue using arrays.

4.

Implement following sorting methods: Bubble sort and Selection Sort.

5.

Implement Sequential and Binary search.

Instructor will frame assignments based on the suggested assignments as given above. Students will submit Term Work in the form of a journal that will include at least 18 assignments (at least five assignments from Group C). Each assignment will consist of pseudo algorithm, program listing with proper documentation and printout of the output.

Practical Examination will be based on the term work and questions may asked to judge the understanding of the assignment

Document info
Document views120
Page views125
Page last viewedSat Dec 10 00:48:12 UTC 2016
Pages32
Paragraphs1002
Words9463

Comments