Armaan's company brings all the items to be used for an event on rent. To make it simple all the items are categorized into various item types. Armaan manages all the items that are being used in an event. For each item total rent is calculated bases on costPerDay and the days it was rented for. Given the date for which item was rented and the date up to which item was rented find the total rent to be paid. Write a C++ program to calculate the total cost of the item. Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement. Create separate classes in separate files. The class ItemType has the following private member variables. Data type Member Name string name double deposit double costPerDay The class ItemTypeBO has the following public member functions No Member Function Method Description 1 double calculateTotalCost(ItemType obj,string startDate, string endDate) In this method calculate the total cost and return the total Amount In the main() method, obtain input from the user in the console and create a new ItemType object and assign the values to the object's members using setters. Create an ItemTypeBO object to call calculateTotalCost function. Display the total cost in the main itself. Input format: The first input is corresponding to the itemtype name. The second input is corresponding to the deposit for that item. The third input is corresponding to cost per day. The fourth line of input is the start date from when the item was rented in format dd/mm/yyyy. The fifth line of input is the end date till when the item was rented in format dd/mm/yyyy. Note: Dates are entered in a valid format and belong to the same month. Output format: The output consists of total cost printed up to 2 decimal places. [Note: The date on which ItemType is returned is not included to calculate the cost.] [All text in bold corresponds to input and rest corresponds to output] Sample Input and Output 1: Enter the item type name furniture Enter the deposit amount 1200.00 Enter the cost per day 150.00 Enter start date in format dd/mm/yyyy 12/01/2017 Enter end date in format dd/mm/yyyy 17/01/2017 Total cost:750.00 Sample Input and Output 2: Enter the item type name electronics Enter the deposit amount 2000.25 Enter the cost per day 120.25 Enter start date in format dd/mm/yyyy 20/12/2016 Enter end date in format dd/mm/yyyy 23/12/2016 Total cost:360.75

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

QUESTION PROVIDED IN ATTACH IMAGE KINDLY SEE.

IF THERE IS A DECIMAL IN OUTPUT WHETHER IT'S ZERO OR TWO PLACE DECIMAL YOU MUST MATCH AS IT IS WITH QUESTION OUTPUT NO MISMATCH IN OUTPUT ACCEPTED

AND BELOW TEMPLATES PROVIDED CHECK THIS BEFORE MAKING SOLUTION ( main.cpp , donor.cpp  )

----------------- TEMPLATES BELOW FOR SOLUTION -----------------------

 

main.cpp

#include <iostream>
#include "Donor.cpp"
using namespace std;

// Fill your code here

int main() {

// Fill your code here

return 0;
}

 

Donor.cpp

 

class Donor {

//Fill your code here
};

 

Armaan's company brings all the items to be used for an event on rent. To make it simple all the items
are categorized into various item types. Armaan manages all the items that are being used in an event.
For each item total rent is calculated bases on costPerDay and the days it was rented for. Given the
date for which item was rented and the date up to which item was rented find the total rent to be paid.
Write a C++ program to calculate the total cost of the item.
Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names,
member variable names, and function names should be the same as specified in the problem
statement. Create separate classes in separate files.
The class ItemType has the following private member variables.
Data type
Member Name
string
name
double
deposit
double
costPerDay
The class ItemTypeBO has the following public member functions
No Member Function
Method Description
1 double calculateTotalCost(Item Type obj,string startDate, string endDate)
In this method calculate the total cost and return the total Amount
In the main() method, obtain input from the user in the console and create a new ItemType object and
assign the values to the object's members using setters. Create an ItemTypeBO object to call
calculateTotalCost function. Display the total cost in the main itself.
Input format:
The first input is corresponding to the itemtype name.
The second input is corresponding to the deposit for that item.
The third input is corresponding to cost per day.
The fourth line of input is the start date from when the item was rented in format dd/mm/yyyy.
The fifth line of input is the end date till when the item was rented in format dd/mm/yyyy.
Note: Dates are entered in a valid format and belong to the same month.
Output format:
The output consists of total cost printed up to 2 decimal places.
[Note: The date on which ItemType is returned is not included to calculate the cost.]
[All text in bold corresponds to input and rest corresponds to output]
Sample Input and Output 1:
Enter the item type name
furniture
Enter the deposit amount
1200.00
Enter the cost per day
150.00
Enter start date in format dd/mm/yyyy
12/01/2017
Enter end date in format dd/mm/yyyy
17/01/2017
Total cost:750.00
Sample Input and Output 2:
Enter the item type name
electronics
Enter the deposit amount
2000.25
Enter the cost per day
120.25
Enter start date in format dd/mm/yyyy
20/12/2016
Enter end date in format dd/mm/yyyy
23/12/2016
Total cost:360.75
Transcribed Image Text:Armaan's company brings all the items to be used for an event on rent. To make it simple all the items are categorized into various item types. Armaan manages all the items that are being used in an event. For each item total rent is calculated bases on costPerDay and the days it was rented for. Given the date for which item was rented and the date up to which item was rented find the total rent to be paid. Write a C++ program to calculate the total cost of the item. Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement. Create separate classes in separate files. The class ItemType has the following private member variables. Data type Member Name string name double deposit double costPerDay The class ItemTypeBO has the following public member functions No Member Function Method Description 1 double calculateTotalCost(Item Type obj,string startDate, string endDate) In this method calculate the total cost and return the total Amount In the main() method, obtain input from the user in the console and create a new ItemType object and assign the values to the object's members using setters. Create an ItemTypeBO object to call calculateTotalCost function. Display the total cost in the main itself. Input format: The first input is corresponding to the itemtype name. The second input is corresponding to the deposit for that item. The third input is corresponding to cost per day. The fourth line of input is the start date from when the item was rented in format dd/mm/yyyy. The fifth line of input is the end date till when the item was rented in format dd/mm/yyyy. Note: Dates are entered in a valid format and belong to the same month. Output format: The output consists of total cost printed up to 2 decimal places. [Note: The date on which ItemType is returned is not included to calculate the cost.] [All text in bold corresponds to input and rest corresponds to output] Sample Input and Output 1: Enter the item type name furniture Enter the deposit amount 1200.00 Enter the cost per day 150.00 Enter start date in format dd/mm/yyyy 12/01/2017 Enter end date in format dd/mm/yyyy 17/01/2017 Total cost:750.00 Sample Input and Output 2: Enter the item type name electronics Enter the deposit amount 2000.25 Enter the cost per day 120.25 Enter start date in format dd/mm/yyyy 20/12/2016 Enter end date in format dd/mm/yyyy 23/12/2016 Total cost:360.75
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Database connectivity
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education