اهلا
السلام عليكم ورحمه الله وبركاته
كم اسعدني انظمامي حديثا لكم
فكم استفدت منكم جزاكم الله خيرا
....
هذا سؤال اتمنى منكم شرحه لي
- ما المطلوب؟
انا الاشياء اللي فهمتها كلمات متقاطعه لان لغتي ليست جيده
اسأل الله ان يوفق ويسعد من يرد علي ويعطيه اعظم مما تمنى
هذا نص السؤال
A certain trains’ station contains a single area on which arriving train
must stop. The first train is preparing to stop, it will use the stopping
area, doesn’t allow other train to stop. Otherwise, it waits until all trains,
arrived before, stopped. When the train has stopped, the stopping area is
available for use by other train.
1. Give the suitable data structure to solve this problem and why?
2. Implement the following operations:
a. Arriving of a train (add new entry).
b. Stopping of a train.
c. Print information of all trains waiting for stop.
Note:
· Train information contains : train_ID and number of passengers.
· QueueADT file is attached; you will need it to solve the exercise.
ارجوكم اريد ان احل في اقرب وقت
وفقكم الله



