Write a program to operate the barriers

Assignment Help Programming Languages
Reference no: EM13145713

Consider the above diagram, FIGURE, of the car park. The object of this assignment is to write a program to operate the barriers to allow the cars in and out.

399_Write a program to operate the barriers.png

As you can see there is a box in which there are two condition lights for when the car park is Full, and when there are Spaces.

The entrance to the car park is on the left hand side. When a car drives into the car park there is a sensor that detects the car and this should cause the barrier to be opened to allow the car in.

On the right hand side is the exit. When a car leaves the car park it will activate a sensor inside the park to open the exit barrier.

Both the entry and exit barriers will need to be in the Up position long enough to allow the cars to enter or leave the car park. The inputs and outputs are listed as follows:

IP0 = Entry Sensor OP0 = Entry Barrier
IP1 = Exit Sensor OP1 = Exit Barrier
OP2 = Full Light
OP3 = Spaces Light

When writing the program it is necessary to observe the following conditions. When the car park is not full the Spaces light should be ‘ON'. When the car park is full the Full light should be ‘ON'. As a car enters or leaves the car park the entry and exit barriers have to be held in the Up position long enough to allow the cars to pass under the barriers.

When the program is complete and the car park graphic is displayed in Simulation mode the program is operated by pointing at the car and clicking the mouse button. You will see directional pointers left and right so point at and click the direction you wish the car to travel. When you wish a car to leave the car park point at the one you wish to leave the park and click. You should explain the operation of the program, using the documentation facility.

Reference no: EM13145713

Questions Cloud

Define what is the first step in the reaction sequence : What is the first step in the reaction sequence of these Aldol reactions under basic conditions?
Identify what is the best measure of variability to use : Which would be inappropriate, and why. Then identify what you think is the best measure of variability to use for your example and explain why you believe it to be better than the others.
Decisions which affecting the future of business : How are the income statement and statement of cash flows used to make business decisions? What are the advantages and limitations of using them to make decisions affecting the future of a business?
Could an organism be both mr and vp negative : Any organism that uses the Krebs cycle can use citrate and most organisms have the enzymes for the Krebs cycle. Why then do so many organisms test Citrate negative with the citrate test?
Write a program to operate the barriers : The entrance to the car park is on the left hand side. When a car drives into the car park there is a sensor that detects the car and this should cause the barrier to be opened to allow the car in.
List the structures an erythrocyte passes through : List the structures an erythrocyte passes through leaving the veins that drain the brain on the way to the spleen. There are supposed to be 15 structures. I am given brain, internal jugular vein, brachiocephalic vein then there are 15 blanks follo..
Records warranty expense with an adjusting entry : These are the only repairs required in 2010 for this copier. Based on experience, Lee expects to incur warranty costs equal to 3% of dollar sales. It records warranty expense with an adjusting entry at the end of each year
Prepare a schedule indicating cash collections : Prepare a schedule indicating cash collections from sales for May, June, and July.
Explain the pressure and temperature rise : A rigid tank contains 20 lbm of air at 20 psia and 70F. More air is added until the pressure and temperature rise to 35 psia and 90F

Reviews

Write a Review

Programming Languages Questions & Answers

  Calculate and display optimal cost for cylindrical container

Compute and display the height and cost of container. Use the following formulas, where V is volume, r is radius, h is the height, and C is the cost.

  Historical principle for loss to the company is minimal

A colleague of yours frequently takes small amounts of office supplies, noting that the loss to the company is minimal. Your rationale expresses which historical principle?

  Cooks selected by methods are different which one is taller

He orders the shortest man in each column to step aside and chooses the tallest of these twenty-five. The two cooks chosen by the two methods are different. Which one is taller?

  Program to compute total price of items before tax

Program is to compute total price of items before tax and then tax payable on those items. Tax payable is computed by applying tax rate percentage to total price.

  Write program which computes amount of money earn

Write a program which computes amount of money person would earn over period of time if his or her salary is one penny the first day, two pennies the second day.

  Explaining law of diminishing returns

As computer word size gets larger and larger, there is a law of diminishing returns; speed of execution of application programs doesn't increase and may, in fact, decrease.

  Create software to perform advanced geometric calculations

You are hired by the engineering company to create software which performs advanced geometric calculations. Your new boss asked you to create the application

  Create new program which prompts user for numbers

Create a new program whihc prompts a user for numbers and determines total revenue using following formula: Total Revenue = Price * Quantity.

  Explain overriding method

Assuming the class B inherits from class A and method foo belongs to class A, what do we mean by overriding method foo in class B? We are coding another version of method foo in class B

  Write function template that accepts array

Write a function template arraySum () whihc accepts an array and number of values stored in it and returns sum of those values.

  Write tax program having single formula to compute tax

Write the tax program with following logic: Set variables cutoff15 and cutoff28 which depend on marital status. Then have single formula which computes tax, depending on incomes and cutoffs.

  Explain book constructor to accept and initialize data

Create and execute the class called Book which contains instance data for title, author, publisher, and copyright date. Explain the Book constructor to accept and initialize this data.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd