1. Write a class called Item. It should have the following attributes (fields): a) a String name to store the name of the item. b) a String comment to store a comment about the item. c) a double value to store how much the item cost
2. Write a CD class that extends the Item class. CD’s have a String artist field and an int playingTime field. Write a DVD class that extends the Item class. The DVD class has a String director and an int runningTime
3. Write a Database class that creates and maintain a list of multimedia items. Your class must use the subclasses defined above to provide the following minimum functionality: a) add an item to the list b) remove an item to the list c) print out a list of items (to the screen) d) depreciates each item 4. Write a test program that creates some items of different types, adds them to the database, removes one of them and then prints out a list.
Execute this code with THREE pushes and ONE pop stack s; s.push(1); s.push(2); s.push(3); cout << s.pop( ); Suppose that s is represented by a linked list. Draw the state of the private member variables of s after the above code:
_______
head_ptr | |
|_______|
Write a console application for a club to record their member information. For each member to need to store the member’s name and merit points. All new members starts with 0 merit points. Implement class Member which has private attributes for Name and Points. You need to create at a constructor
Write a program to find the greatest of two given m two different classes using friend function.
WAP in C++ to find the biggest of three numbers using friend function.
WAP in C++ to find a Fibonacci scries using copy constructor.
WAP to create a class which stores a dynamic integer array and its size. Include all the constructors and destructor in the class. Store two arrays of different size in two objects. Join the two arrays and and store it in another object using a member function.
Implement conversion from INFIX to POSTFIX and evaluation of POSTFIX