Question
( C++ program ) use inheritance and polymorphism to calculate the force required to pull (at a constant velocity) and the weight of material that
(C++ program) use inheritance and polymorphism to calculate the force required to pull (at a constant velocity) and the weight of material that can be carried by a train consisting of many different types of cars. The weight(W)and rolling friction coefficient(f) can be used to compute the force(F=fw). Consider FLAT BED CAR(B),BOX CAR(X) and TANK CAR(T). The VOLUME for each type of car isB(10m3), X(20m3) and T(15m3). Read (FROM A FILE) the type of car and density (in kN/m3) of material being carried. A sample data file (train.dat) is :
B 5.3, X 6.7, X 5.6, X 7.3, T 9.8, T 8.4, T 10.3, B 3.2, B 4.2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started