(Solved) : Excrcise L Write Program Implements Class Called Parkingspace Representing System Takes Tr Q33390382 . . .
In python using classes….
Excrcise l Write a program that implements a class called ParkingSpace representing a system that takes track of the number of vehicles in a public parking Your class should inclade a constructor for setting the maximum capacity of the parking given by the caller, and the current number of occupied parking slots to O. should also include methods simulating entry of a new car to the parking, exit of a car from the parking, and a method that displays the number of available parking lots in the parking. If the parking is full, no car entry should be allowed and if the parking is empty no car exit should be al lowed and in both cases adequate messages should be displayed Write a driver method that simulates the vehick entry and exit to and from the parking Evcrcise 2 Implement a class CAR with the following properties. A car has certam fxl efficiency, measured in literskm, and a certain amount of fuel ะธ the gas tank. The efficiency is specified in the constractor, and the initial fuel level is 0. Supply a method drive that simulates driving the car for a certain distance, reducing the amount of petrol inthe fuel tank. Also supply methods gerGahr Tank( 시etuming current amont of petrol the fuel tank, and addGas)to add petrol to the fiael tank. You may assume that the drive method is never called with a distance that consumes more than the available petrol supply aCar Tester dass that tests all methods Excrcise(Suhmit your solution by Saturday 24/3/2018 (@23:55) Implement a class Snudent, where a student has a name and a total quiz score Supply an appropriate compute the latter, you also need to store the number of quizaes that the student took Evcrcise 4 Write a programthat implements a class named threcDObject The possible obyects ฮe ere, cylinder, and cone Your program should include a constractor that is called to instantiate a 3D object (sphare, cylinder or cone), with specified parameter values (radius in the case of a sphere, and radius and height in the case of the two other obyects). It should also include the following meth!ds getsurface。and gervolume) that return the surface and the volume of the object respectively,gat Name0 and get Parametens) that return the name and the parameter values (radius and heigha) of the object respectively Note that The surface of a sphere is given by the following formula: 2 The volume of a sphere is given by the following fomula Volume 3. The surface of a cone is given by the following formula Area = m(1 + r) The volume of a cone is givem by the following formula: S. The surface of a cylinder is given by the following formula: 6. The volume of a cylinder is given by the following formula Volume a drive program that tests your class Show transcribed image text
Expert Answer
Answer to Excrcise L Write Program Implements Class Called Parkingspace Representing System Takes Tr Q33390382 . . .
OR