For the fifa world cup 2006

Assignment Help Business Management
Reference no: EM13167046

For the FIFA World Cup 2006, a fly-over has been constructed between the hotel where the teams are staying and the stadium. This fly-over will be used by the German team and the Italian team in their upcoming exhibition match. A tram car is used to cross this

fly-over, but it seats only four people, and must always carry a full load.

We cannot put three Italians and one German in the same tram-car, because the Italians

would be in majority and might try to intimidate the German. Similarly, we cannot put

three Germans in the same tram-car with one Italian. All other combinations are safe.

You are required to code two processes; the first shall simulate the arrival of German

players and the other the arrival of Italian players. These players can come at any time, in any

order to cross the fly over. The first process shall call a procedure called GermanHere

on the arrival of a German player. Similarly, the second process shall call a procedure

called ItalianHere on the arrival of an Italian athlete. As soon as a safe combination

is reached, the tram starts and crosses to other side. Assume that a tram is always

available when required.

Use semaphores to implement the solution. The Germans and Italians should not wait if

there are enough of them for a safe tram-car load. The two processes will simulate the

arrival of players at random intervals and should run for a while to show around 10 trams

leaving with different safe combinations. Before terminating you must clean up the

semaphores and shared memory segments from the system.

You must output the progress of the processes. E.g. when a player arrives you should

output who arrived and also print the total number of Germans and Italians waiting to

board the tram. When a tram leaves you should output that as well.

Your code should include well written comments and at the beginning, you should

explain your strategy for solving the problem.

Reference no: EM13167046

Questions Cloud

Explain the concept of locality of reference : 1. Explain the concept of locality of reference and state its importance to memory systems.
Which a ball is released from a user-defined height : Write a program in which a ball is released from a user-defined height and free-falls to the ground. The ball is pulled by earth's gravity of 9.8 m/sec 2 . Assume that each pixel represents
Create a text-based, menu-driven program : Create a text-based, menu-driven program that allows the user to choose whether to add, subtract, multiply or divide two numbers. The program should then input two double values from the use
Search the web for security education and training program : Search the Web for security education and training program in your area. Keep a list and see which category has the most examples. See if you can determine the costs associated with example. Which do you think would be more cost-effective in terms of..
For the fifa world cup 2006 : For the FIFA World Cup 2006, a fly-over has been constructed between the hotel where the teams are staying and the stadium. This fly-over will be used by the German team and the Italian team in their upcoming exhibition match. A tram car is used t..
Write a java program that reads a five-line address : Write a Java program that reads a five-line address from an input file and produces an output file with the address repeated 50 times in three columns.
Define a class called counter : Define a class called Counter. An object of this class is used to count things, so it records a count that is a non negative whole number. Include methods to set the counter to 0, to increase the count by
Prompts for an int8 value to inspect and then prints : Write an HLA Assembly program that prompts for an int8 value to inspect and then prints it in binary format.
Temporarily move to the street so that the : Driveway is a "last-in, first-out" stack. Of course, when a car owner retrieves a vehicle that wasn't the last one in, the cars blocking it must temporarily move to the street so that the requested vehicle can leave

Reviews

Write a Review

 

Business Management Questions & Answers

  Managing cross-functional teams

Managing Cross-Functional Teams - What do you need to do to manage cross-functional teams? How can a manager maintain order in such a diverse group?

  Show the culture of the international countries

Find and show the sources of conflict related to the culture of the international countries where Wal-Mart does business

  Define attention deliberate how five of the several stimulus

Define attention deliberate how five of the several stimulus factors influence attention to a stimulus and explain how you can use each in your advertisement.

  Question about opening a business

Assume you and your two college roommates have discussed plans to open a restaurant. You intend to attract college age learners who are health and fitness minded to your restaurant.

  Design conflict management systems

Prepare a conflict management models using a build in preventive methods of alternative dispute resolution

  Explain what can you as a pm do to avoid group think

Explain What can you as a PM do to avoid group think on your team and What types of tools would you use to help you build consensus?

  Show the effective team communication

Explain what communication processes were adopted in each case and what message/information was the sender trying to send out?

  The business being analysed is a personal transportation

The business being analysed is a 'personal transportation and errand services' company for the elderly in Naples

  Key element in leader-s choice of style

A key element in the leader's choice of style is their expectations about how others will respond to them.

  Budgetary concerns in planning an event

What are some budgetary concerns in planning an event and what is the effect of a needs assessment on the budget?

  Examine the presentation environment

Assume you are the workgroup leader in the finance section at New Products Creation, Inc. The firm is seeking financing for a new robotics component manufacturing plant.

  Explain quality cost data for a manufacturer

Explain What conclusions can you make with respect to quality given the cost of quality information presented?

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