Find Jobs
Hire Freelancers

c++ program represent

$30-5000 USD

Закрито
Опублікований about 15 years ago

$30-5000 USD

Оплачується при отриманні
**The specification:** ? By using the setup provided by the GWin library and the example project provided for you, you can create graphics window and several processes which represent 5 trains going through a weak bridge. ## Deliverables **The specification:** ? By using the setup provided by the GWin library and the example project provided for you, you can create graphics window and several processes which represent 5 trains going through a weak bridge. For the purposes of the coursework we will assume that a train will be represented by a line and you will be able to run 5 trains from left to right and back on their own. Next assume that the middle of the graphics window is a weak bridge which will withstand on it two trains only at any one time and each train must synchronize its entry onto the bridge using a semaphore - so that it would not collapse. Two trains max allowed on to the bridge at any one time and they can move in any direction. There is also a ship going from top to bottom and back on the screen. All graphics is provided for you, but the drawing performed by the program is not synchronised on the screen. ? ? **To do for 40%:** Create synchronisation procedure for all 6 processes (5 trains and a ship) using appropriate semaphores for correct functioning of the bridge (no more than two trains at a time on the bridge) and for correct functioning of the printing the text in a text window and for drawing the graphics (the example is provided for you without graphics screen synchronisation).? Show graphically all movements on the screen. Implement random speed changes at the turnaround points constant for each run across the screen for each of the trains and the ship. **? ** **In addition for 50%** Assume that at the left of the screen there is train station (West train station) and at the right of the screen there is train station (East train station). Each of these stations makes use of separate FIFO buffers (BufferGeneric Class as defined in GWIN). The take() and append() methods can be used gain access to buffers. The buffers should be used to store “Passenger objects?? as defined in the example code.? “Passenger objects?? contain information about the passengers and their journeys. The East stations buffer should be used to store “Passengers?? about to board a train, while the West station’s buffer should contain the passengers who have finished their journeys. In the example code there are threads already setup for each train and each station.? ? ? ? Use the East station thread to create Passenger objects and store them in the East Station Buffer. Each train (thread) arriving at the East Station takes 6 passengers from the East Station buffer, and stores them in its internal buffer. As trains arrive at the West station, all their Passengers should be placed in the West station’s buffer. West station thread should be used to take the Passenger objects from the buffer and to print the information on the screen (in a text window). Synchronise the use of the buffers so that the trains and the additional processes at the stations work according to the producer-consumer paradigm.
ID проекту: 3538596

Про проект

5 пропозицій(-ї)
Дистанційний проект
Активність 15 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
5 фрілансерів(-и) готові виконати цю роботу у середньому за $233 USD
Аватарка користувача
See private message.
$144,50 USD за 3 дні(-в)
5,0 (7 відгуки(-ів))
3,9
3,9
Аватарка користувача
See private message.
$170 USD за 3 дні(-в)
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
See private message.
$85 USD за 3 дні(-в)
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
See private message.
$170 USD за 3 дні(-в)
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
See private message.
$595 USD за 3 дні(-в)
0,0 (0 відгуки(-ів))
0,0
0,0

Про клієнта

Прапор SAUDI ARABIA
Saudi Arabia
4,9
2
На сайті з бер. 11, 2008

Верифікація клієнта

Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.