Implement the following question with Class: Avionics 6 batch is assigned a task to develop a...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Implement the following question with Class: Avionics 6 batch is assigned a task to develop a "Toll Tax Collection" program for National Grand Truck Road. Cars passing by the booth are expected to pay a 5OPKR toll. Mostly they do, but sometimes a car goes by without paying such as an ambulance. The tollbooth keeps track of the number of cars that have gone by, the total amount collected, and the registration number of cars for security purposes. Model this tollbooth with a class called tollBooth. The attributes are 1) total number of cars (int), 2) total amount of money collected (int), and 3) Registration number of cars (list or NumPy array). A method called payingCar() increments the total number of cars, adds 50PKR to the cash total and append the registration number of the car in the existing list/array. Another method, called nopayCar(), increments the car total but adds nothing to the cash total and also append the registration number. Finally, a member function called display() displays the total cash, total number of cars, and registration number of all of the cars. Implement the following question with Class: Avionics 6 batch is assigned a task to develop a "Toll Tax Collection" program for National Grand Truck Road. Cars passing by the booth are expected to pay a 5OPKR toll. Mostly they do, but sometimes a car goes by without paying such as an ambulance. The tollbooth keeps track of the number of cars that have gone by, the total amount collected, and the registration number of cars for security purposes. Model this tollbooth with a class called tollBooth. The attributes are 1) total number of cars (int), 2) total amount of money collected (int), and 3) Registration number of cars (list or NumPy array). A method called payingCar() increments the total number of cars, adds 50PKR to the cash total and append the registration number of the car in the existing list/array. Another method, called nopayCar(), increments the car total but adds nothing to the cash total and also append the registration number. Finally, a member function called display() displays the total cash, total number of cars, and registration number of all of the cars.
Expert Answer:
Answer rating: 100% (QA)
I am using for spaces due to this app class toll totalmon... View the full answer
Related Book For
Probability and Random Processes With Applications to Signal Processing and Communications
ISBN: 978-0123869814
2nd edition
Authors: Scott Miller, Donald Childers
Posted Date:
Students also viewed these programming questions
-
The Mars Candy Company actually keeps track of the number of red, blue, yellow, etc. M&MsTM there are in each batch. (These make wonderful examples for discussions of sampling.) a) This is an example...
-
A software development company keeps track of the number of errors found in the programs written by the company employees. DS 6.6.3 shows the number of errors found in the 30 programs that were...
-
A phone service center keeps track of the number of customers it services for a random 1-hour period during the day. The distribution is shown. Find the mean, variance, and standard deviation for the...
-
Use the formula A= P(1+) to find the total amount of money accumulated for an initial investment $600 at 8% compounded semiannually after 7 years. Round to the nearest cent (in dollars and cents)....
-
Rancour Ltd., which uses private enterprise GAAP, recently expanded its operations into an adjoining municipality and, on March 30, 2011, signed a 15-year lease with its Municipal Industrial...
-
A uniform thin film of material of refractive index 1.40 coats a glass plate of refractive index 1.55. This film has the proper thickness to cancel normally incident light of wavelength 525 nm that...
-
Identify at least three grounds a party may have for objecting to interrogatories.
-
Mitachlordion Technology, Inc. (MTI), has two divisions: Birmingham and Tampa. Birmingham currently sells a diode reducer to manufacturers of aircraft navigation systems for $1,550 per unit. Variable...
-
Suppose you were a financial analyst trying to compare the performance of two companies. Company A uses the double-declining- balance depreciation method. Company B uses the straight-line method. You...
-
Consolidation related simulation example: Millennium Capital Management, Inc., (MCM) acquired a 90% interest in NextGen, Inc. MCM's Financial Manager, Matthew Steven, has prepared a draft memo to the...
-
1-The two IT staff members responsible for the servers have heard about Server Manager and are requesting training in its use. Prepare a brief report or slide presentation for them, to cover the...
-
5. You have a radio that you know uses an RLC-circuit. It is tuned to f = 101.9 MHz. You are using a 2.4 10-7 H solenoid in your circuit and a 12 2 resistor. What is the capacitance that should be...
-
Marketing Analytics 6.1 The Expanding Uses of Data Mining and Analytics in the Restaurant Industry** When Damian Mogavero, a restaurant group CFO, realized the vast need for improved data analytics...
-
X= If there is more than one answer, separate answers with a comma. x+3x-28 0 W
-
Four of the wavelengths of the Balmer series occur in the visible spectrum (656 nm, 486 nm, 434 nm, and 410 nm). In which region of the electromagnetic spectrum does the fifth line, with a wavelength...
-
When a person sweats, the water evaporating from the skin undergoes a transition from liquid to vapor. How does this help in regulating body temperature?
-
2. OSHA 1994, Section 15(2)(a) requires employers to ensure, as far as practicable, a plant and system of work that are safe and without risks to health. Based on ONE organisation, describe the most...
-
Determine the optimal use of Applichem's plant capacity using the Solver in Excel.
-
Suppose Xm, m = 1, 2,¦.,n are a sequence of independent and exponentially distributed random variables with Assuming that is an odd number (n = 2k 1 for some integer ): (a) Find the PDF of the...
-
Find the impulse response and transfer function of a filter matched to a triangular waveform as shown in the accompanying figure when the noise is stationary and white with a power spectrum of No /...
-
Suppose a pair of random variables is uniformly distributed over a rectangular region, A: x1 2 2
-
A spring-mass system has a natural period of \(0.21 \mathrm{~s}\). What will be the new period if the spring constant is (a) increased by \(50 \%\) and (b) decreased by \(50 \%\) ?
-
An industrial press is mounted on a rubber pad to isolate it from its foundation. If the rubber pad is compressed \(5 \mathrm{~mm}\) by the self weight of the press, find the natural frequency of the...
-
Three springs and a mass are attached to a rigid, weightless bar \(P Q\) as shown in Fig. 2.51. Find the natural frequency of vibration of the system. 0000 0000 k 12. 13 m + FIGURE 2.51 Rigid bar...
Study smarter with the SolutionInn App