Sbmit a write-up as well as your program your write-up


Objectives:

1. Become familiar with Programming Assignment

2. Work with multiple processes

3. Gain e-perience with process communication

These will be individual projects. The main purpose of this Lab assignment, i.e. LAB0, is to become familiar with the programming assignment and prepare the first lab that will be announced at the ne-t week.

For LAB0, you may choose any programming language, such as .NET, Visual C++, Java, C, etc. However, keep in mind that the first lab assignment (LAB1) will be based on this assignment and include Graphical User Interface. Therefore, the students are encouraged to choose the programming language that supports GUI, and runs on Windows. Also, the other OS that support GUI desktop, e.g. Gnome and KDE for Linu-, are possible. Finally, your final program should be compiled and run on TA's computer. To do that, you need to provide all materials as well as source code, such as run time module, integrated development environment (Visual Studio, .NET or C#), and any other program to run your program.

You are to implement a game of ‘Scissors, Rock, and Paper'. This program does not require GUI, nor user interactions. Your program should consist of three processes as seen in the Figure 1. The main process is the ‘Manager'. It should create two other processes (children processes) and manage the game. It is responsible to judge the results from children's processes, i.e. winner or tie.

758_Game of Scissors-Rock and Paper.png

The desired output sequence is as follows:

1. Start your program (Manager process)

2. Display PID of Manager process 3. Create two children process

4. Display PIDs of children processes: for e-ample

# Child1's PID is 123
# Child2's PID is 234

5. Manager sends message "Start Game" to children processes

6. Each child process randomly generates number 0, 1, or 2 (0:Scissors, 1:Rock, and 2:Paper)

7. Each child process sends the number to manager process

8. Manager process display each child's choice: for e-ample
# Child1 is ‘Scissors' and Child2 is ‘Rock'

9. Manager process declare a winner or tie: for e-ample
# Child1 is a winner (go to Step 11)
Or # This game is tie (go to Step 10)

10. If the game is tie, go to Step 6 with a message "Restart Game"

11. Manager process first sends kill signal to the loser.

12. Then, manager process sends kill signal to the winner.

13. Finally, e-it manger process.

The procedure mentioned above is just simple one. You can add or modify the procedure as long as your program does not disobey the main requirements.

Two important things that should be decided before you code:

- Which language I use.
- Which communication method I use.

Write-up

You should submit a write-up as well as your program. Your write-up should include any known bugs, limitations, and assumptions in your program. This write-up should be in text-format and titled as ‘README'. It should be submitted along with your code. GA will use the ‘README' file to compile (or install) and run your program. If the GA has trouble with your program then he will contact you to makeup it.

Solution Preview :

Prepared by a verified Expert
Operating System: Sbmit a write-up as well as your program your write-up
Reference No:- TGS0926254

Now Priced at $35 (50% Discount)

Recommended (92%)

Rated (4.4/5)