Question
1) Create a first ParentVehicle contract that includes the following functions start - returns String message The Vehicle has just Started accelerate - returns String
1) Create a first "ParentVehicle" contract that includes the following functions start - returns String message The Vehicle has just Started accelerate - returns String message The Vehicle has just Accelerated stop -- returns String message The Vehicle has just Stopped service- returns String message The Vehicle is being serviced
2) Next Create following Child contracts for a different type of vehicles, that inherits Vehicle Cars Truck MotorCycle, (The contract shall override the Service Method to return, w Cars/ Truck/ Motor Cycle is being serviced)
3) Then create smart contracts for Alto Mehran, Hino, Yamaha, that may inherit the relevant smart contract(s) as in step 2.
4) Create 3 Service Stations for each vehicle type, with the same function vehicleService that takes the address of the deployed contracts of step 3, in the Vehicle variable to call the service function
****Programming Language** >> Solidity
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