Assignments.pdf - MES’s Institute of Management and Career Courses Pune T1-IT31L-Advanced Data Structure and C Lab Academic Year 2019-20 Practical

Assignments.pdf - MES’s Institute of Management and...

This preview shows page 1 - 2 out of 2 pages.

MES’s Institute of Management and Career Courses, Pune 1 T1-IT31L-Advanced Data Structure and C++ Lab Academic Year 2019-20 Practical Assignments 1. An electricity board charges the following rates to domestic users to discourage large consumption of energy: For first 100 units: 60P per unit For next 200 units: 80P per unit Beyond 300 units: 90P per unit All users are charged minimum of Rs.50. If the total amount is more than Rs.300 then an additional surcharge of 15% is added. Write a program to read the names of users and number of units consumed and print out the charges with names. 2. Create a class Length containing data members mtrs and cms. Create a class Distance containing data members kms and mtrs. Write a friend function compare() which takes two parameters length object and distance object and returns the difference in cms. 3. Write a class to represent a vector with following member functions: a) To create the vector (use Constructor) b) To multiply by scalar value c) To display the vector in the form (10, 20, 30 ….)
Image of page 1

Subscribe to view the full document.

Image of page 2
  • Spring '17
  • hihijoijo

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes