Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use RIMS simulator to create and run a program as a solution to each of the two exercises below: NOTE: This homework is to be

Use RIMS simulator to create and run a program as a solution to each of the two exercises below: NOTE: This homework is to be coded in C language with while loops to wait for changes. Maybe you do not have a perfect solution. Do the best you can and submit your work to show you have done diligence on these exercises.

1. A lock has two switches. These are A0 and A1. Once the proper sequence is followed, the lock will open. Write C code for the lock using while loops to wait.

Start at State 0, waiting for State 1 to become true, pseudocode is: while (!(State 1)) then wait for the correct next state condition to occur

State A1 A0

0 0 0

1 0 1

2 1 1

3 1 1(open the lock)

2. An automatic door at a store has a sensor in front (A0) and behind (A1). The door opens (B0=1) when a person approaches from the front, and stays open as long as a person is detected in front or behind. If the door is closed and a person approaches from the behind, the door does not open. If the door is closed and a person approaches from the front but a person is also detected behind, the door does not open, to prevent hitting the person that is behind. Show a description of the sequence of events and the C code for the solution.

http://ritools.cs.ucr.edu/

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago