subject
Engineering, 02.03.2020 19:27 dayi80

The Scratchemup parking garage contains a single lane that holds up to 10 cars. Cars arrive at the south end of the garage and leave from the north end. If a customer arrives to pick up a car that is not the northernmost, all cars to the north of his car are moved out, her car is driven out, and the other cars are restored in the same order that they were in originally. Whenever a car leaves, all cars to the south are moved forward so that at all times all the empty spaces are in the south part of the garage. Write a program that reads a group of input lines. Each line contains an a for arrival and d for departure and a license plate number (example: 979WJC). Cars are assumed to arrive and depart in the order specified by the input. The program should print a message each time that a car arrives or departs. When car arrives, the message should specify whether or not there is room in the garage for the car. If there is no room for a car, the car then proceeds to the Knockemdead garage...which is similar to the Scratchemup. There is room for 8 cars at the Knockemdead garage. If both garages are full, cars wait in the street near the Scratchemup garage for a space...and of course they are queued up in the street. The size of the street queue is also 8.So in summary, when a car arrives it tries to park in the Scratchemup garage. If there is no room, it goes to the Knockemdead garage. If there is no room there, it waits in the street. A message indicates which garage it is in (or the street). When room becomes available, and a car moves from the street to one of the garages, another message should be printed. When a car departs, a message indicates that a car has departed and also indicates which garage (or the street). This departure message should also include the number of times the car was moved within the garage (including the departure itself, but not the arrival). This number is zero if the car departs from the street and not from one of the garages.

ansver
Answers: 3

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Aloaded platform of total mass 500 kg is supported by a dashpot and by a set of springs of effective stiffness 72 kn/m. it is observed that when the platform is depressed through a distance x = 12.5 cm below its equilibrium position and then released without any initial velocity; it reaches its equilibrium position in the shortest possible time without overshoot. find the position and velocity of the loaded platform 0.10 sec. after its release. if a further load of 400 kg is added to the platform, find, i) the frequency of damped vibrations, and i) the amplitude of vibration after 2 complete oscillations, given that the initial amplitude is 15 cm.
Answers: 1
question
Engineering, 04.07.2019 18:10
Afluid flows with a velocity field given by v=(x/t)i.. determine the local and convective accelerations when x=3 and t=1.
Answers: 2
question
Engineering, 04.07.2019 18:10
The flow rate of air through a through a pipe is 0.02 m5/s. a pitot static tube is placed in the flow. the radius of the pitot static tube is 1 mm. assuming the flow to be steady and the air to be at 300k, calculate the difference in total and static pressure if the diameter of the pipe is: (a) d 0.1 m d 0.05 m (c) d 0.01 m
Answers: 2
question
Engineering, 04.07.2019 18:20
Steam enters a converging nozzle at 3.0 mpa and 500°c with a at 1.8 mpa. for a nozzle exit area of 32 cm2, determine the exit velocity, mass flow rate, and exit mach number if the nozzle: negligible velocity, and it exits (a) is isentropic (b) has an efficiency of 94 percent
Answers: 2
You know the right answer?
The Scratchemup parking garage contains a single lane that holds up to 10 cars. Cars arrive at the s...
Questions
question
Mathematics, 21.06.2019 15:00
Questions on the website: 13722367