Write a program having a Class Mile with data member dis_mile. Another Class Kilometer with data member dis_kilo. Both classes stores distances. In main function create objects these two classes with parameterized constructors. Write down conversion function for converting Kilometer object to Mile class object
Active Café is a newly launch restaurant in Telupid Town. The owner wants to hire a
programmer to develop an online ordering system. The codes, menus and prices are
shown in the table below.
CODE MEAL NAME PRICE (RM)
1 Chicken Fillet 15.00
2 Roasted Beef 20.00
3 Rib eye Fillet 30.00
CODE BEVERAGE NAME PRICE (RM)
S Syrup 1.50
L Lychee 2.80
C Coconut 3.50
Based on the requirement these are what the owner wanted the system to do.
i. The customer order the meal and beverage based on the code
ii. The system will ask the quantity for each order
iii. The system displays the quantity and the total price of the meal
iv. The system displays the quantity and the total price of the beverage
v. The system displays the total price that the user needs to pay
vi. The system will repeat the process i to v until user put ‘N’ to stop the program
Write a program to convert the text file contents to Upper-case & write the contents into another
file.
Write a program to create a file that contains employee and display the contents in a neatly
formatted manner.
Write a program to store Student objects in a file, search for a student and display his details.
The program also should display the number of the object from the beginning and the end of the
file.
Write a program to create a numeric file and split the file into two files, one containing all odd
numbers and another with even numbers.
Write a program to writing in to a text file, read from a text file and display
Create a base class called Radix10 which has a member function decimal. It can be set and display
by member functions. It also contains a virtual function called convert. Derive two classed from
Radix10. One is called Radix2 and the next is called Radix16. They redefine the convert function
such that the decimal value is displayed into binary or hexa_decimal. They have a data member
length which can be set by member functions. To convert the decimal data is divided by appropriate
radix length times and the remainder which is always from 0 to (radix-1) should be displayed in
reverse order. In hexa decimal, for remainder 10, 11, 12 ,13, 14 and 15 the codes A, B, C, D, E or F
should be used respectively.
Create a base class called Shape which has two double type values. Use member functions get()
and set() to get and set the values. Use a virtual function display_area() to display the area. Derive
two specific classes called Triangle and Rectangle from the base class Shape. Redefine
display_area() in the derived classes. Write a program to display the rectangle or triangle area.
Write a program for a publishing company that markets both printed books and audio visual
lectures stored on CDs. Write a class Publication thatstores title and price. Derive a class book which
has an additional member as no_pages and a class Lecture with member play_time.