1. Create a C++ program that has a class. The class is called car and has attributes...
Question:
1. Create a C++ program that has a class. The class is called car and has attributes such as color, engine capacity and price. Create a function called journey that calculates the cost of a journey of 400km assuming the cost of a litre of petrol is Ksh 215 and the car covers 15km per litre of fuel.
2. Create a class called Addition with three integer variables namely addition, subtraction and multiplication. Create a function that receives two integer parameters and calculates their product, sum and difference. The returned values should be assigned to the declared variables respectively (that is addition, subtraction and multiplication)
3. Create a class called a book with attributes title, author and price. Create a function called fines that charges Ksh 10 for everyday the book is not returned to the library. The function should work with two parameters namely number of days and fine per day.
Management Accounting Information for Decision-Making and Strategy Execution
ISBN: 978-0137024971
6th Edition
Authors: Anthony A. Atkinson, Robert S. Kaplan, Ella Mae Matsumura, S. Mark Young