堆栈计算代写 EECS 560代写 Lab代写 c++代写 编译代写
510EECS 560 Lab 4: Index and Postfix Calculation using Stacks 堆栈计算代写 Objective Understand the infix and postfix calculation using stack. Specifications 1. Only addition (“+”), subtraction (...
View detailsSearch the whole station
c++作业代写 CISC_2000 Final Lab A set of classes is used to handle different vehicle types. The class hierarchy is shown in the following diagram.
A set of classes is used to handle different vehicle types. The class hierarchy is shown in the following diagram.
The provided abstract class Vehicle has one protected string variable vin.
#ifndef VEHICLE_H
#define VEHICLE_H
#include <string>
class Vehicle
{
protected:
std::string vin;
public:
Vehicle();
Vehicle(std::string newVin);
virtual void print() = 0;
};
#endif // VEHICLE_H_INCLUDED
Three additional classes are used to represent the different types of vehicles and are described below.
Has member variable:
protected:
int age;
The Car class constructor takes two parameters representing the vin and the age in years.
The tax is $100 if the car’s age is 3 or less years, $50 if more than 3.
Function print() prints the details as shown with prefix “Car”.
Has member variables:
protected:
int weight;
double taxRate2000;
double taxRateOver2000;
The Truck class constructor takes two parameters representing the vin and the weight of the vehicle.
The tax rate taxRate2000=0.12 $ per pound if the vehicle weighs 2000 pounds or less and taxRateOver2000= $0.17 $ per each additional pound over 2000 pounds.
The Truck class has function setTaxRate(double txr1, double txr2) to allow the taxRate to be modified. For example: setTaxRate(0.10,0.15) would change taxRate2000 and taxRateOver2000 to 0.10 and 0.15 respectively.
Function print() prints the details as shown with prefix “Truck”.
A truck that carries liquids, has no member variables at all. The tax is 20% less than that of a regular truck.
The TankTruck class constructor takes two parameters representing the vin and the weight of the vehicle.
If the tax rates for Truck class changes, the TankTruck tax should continue to be computed correctly with no code modifications to the TankTruck class.
Function print() prints the details as shown with prefix “Tank Truck”.
Provided test program creates 6 vehicles:
Car car_1("CAR1_3123123123",2);
Car car_2("CAR2_1231231234",4);
Truck truck_1("TRK1_3123123123",2000);
Truck truck_2("TRK2_4567890123",2100);
TankTruck tanktruck_1("TNKTRK1_31234567",2000);
TankTruck tanktruck_2("TNKTRK2_3456789", 2100);
truck_1.setTaxRate(0.10,0.15);
tanktruck_1.setTaxRate(0.10,0.15);
It places them in an array of Vehicle objects and prints their details.
Car Vin: CAR1_3123123123 Age: x Tax: xxx Car Vin: CAR2_1231231234 Age: x Tax: xxx Truck Vin: TRK1_3123123123 Weight: xxxx Tax: xxx Truck Vin: TRK2_4567890123 Weight: xxxx Tax: xxx Tanker Vin: TNKTRK1_3123456 Weight: xxxx Tax: xxx Tanker Vin: TNKTRK2_3456789 Weight: xxxx Tax: xxx
10 Abstract class Vehicle not modified. The provided one will be used when grading.
4 Both Car.cpp and Car.h compile and produce correct output.
4 Both Truck.cpp and Truck.h compile and produce correct output.
4 Both Tanker.cpp and Tanker.h compile and produce correct output.
4 Output in the same format as above. One line per vehicle.
4 No inline functions (-4 if any is present. -4 points if any .h or .cpp file is missing or empty).
Zip your files before submitting. Check that all your files are in the zip archive -4 if any is missing that you need to re-submit after the test is over.
更多代写:温哥华Java quiz代考 多邻国线上考试 英国物理代上网课推荐 文科作业代写英国 北美文学分析 turnitin查重降重
合作平台:essay代写 论文代写 写手招聘 英国留学生代写
EECS 560 Lab 4: Index and Postfix Calculation using Stacks 堆栈计算代写 Objective Understand the infix and postfix calculation using stack. Specifications 1. Only addition (“+”), subtraction (...
View detailsObject Oriented Programming Coursework for Endterm: Otodecks 面向对象编程代写 Introduction In this course, we have developed a basic DJ application called Otodecks. For the end of term ass...
View detailsC++ 算法设计考核代写 一、考核题目 (一)病毒株种类 [问题描述] 2019年末一种从未出现过的新型病毒开始在全球迅速蔓延,并且不断变异,人类社会面临了极大的威胁。全球科学家开始共同抗疫。科学家通过研究...
View detailspython code代写会不会是直接抄袭的其他源代码?怎么检验? python code代写 计算机程序的学习非常有用,能够做很多的工作,比如软件工程师、网络安全工程师等,国外的计算机行业也非常发达,去国外高校深造...
View details