Q.4.1 Write the pseudocode for an application that will pass the number of games a player has played to a module which will calculate the net salary of a player.

A player earns R70 000 per game and as the players fall within a higher tax bracket, they automatically pay 25% tax on their earnings. The net salary will be passed back to the mainline logic of the application which will display the net salary of a player.

Module CalculateNetSalary(numberOfGames)

salaryPerGame = 70000
totalEarnings = numberOfGames * salaryPerGame
tax = totalEarnings * 0.25
netSalary = totalEarnings - tax
Return netSalary

numberOfGames = input("Enter the number of games the player has played: ")
netSalary = CalculateNetSalary(numberOfGames)
display "The net salary of the player is: " + netSalary

Here's a possible pseudocode for the application:

```
MODULE calculateNetSalary(numGames):
DECLARE netSalary
SET earnings = numGames * 70000
SET taxRate = 0.25
SET taxAmount = earnings * taxRate
SET netSalary = earnings - taxAmount
RETURN netSalary

MAINLINE:
DECLARE numGames
DECLARE netSalary

INPUT numGames
CALL calculateNetSalary(numGames) and ASSIGN the returned value to netSalary
DISPLAY "The net salary of the player is: " + netSalary
```

In this pseudocode, we have a module called `calculateNetSalary` that takes the number of games played as an input. It calculates the player's earnings by multiplying the number of games by R70 000. It then calculates the tax amount by multiplying the earnings by the tax rate of 25%. Finally, it calculates the net salary by subtracting the tax amount from the earnings and returns the net salary.

In the mainline logic of the application, we declare the `numGames` and `netSalary` variables. We take user input for the number of games played and then call the `calculateNetSalary` module with `numGames` as an argument. We assign the returned value to `netSalary` and then display the net salary to the user.