Safety Problem Planning
Selection structure
The selection structure gives the computer two mutually exclusive statements to perform. Thus, the computer executes a statement if a certain condition is true and another statement if the condition is not true (Zak, 2008). In the programming proposal, the section that needs a selection structure is in the planning of the project which gives the goals and objectives of the proposal. The goal of the programming proposal is to create a safe learning environment for the students. Therefore, in planning, the first step is to identify the areas that pose safety threats to the students. As identified in the programming proposal, there is poor equipment set up and also there are electrical equipment and gadgets which are faulty in the school. Thus, a decision has to be made on what needs to be done to these equipment to enhance school safety.
The purpose of the selection structure is to determine alternative actions that can be taken. On the poor equipment set up, the school can decide on creating different positions for the equipment to make them safer. If this does not work, the other alternative is to displace some of the equipment. This however depends on the usefulness of the equipment. Further, the school can purchase new equipment which is more compatible and thus can singly serve the purposes that were originally served by different equipment and thus make a simpler arrangement. Therefore, the selection structure enables the school to choose the best option based on how much safe it would be for the students. Electrical equipment and gadgets that are faulty are a great risk to students. Therefore, they can either be repaired or new equipment that are in good order bought to replace the faulty ones.
Selection structure during safety planning
Conditional expression is represented by strShiftCode
Creating different positions = 1
Displacing some equipment = 2
Purchase of new equipment = 3
If strShiftCode = “1” Then
sngShiftRate = create different positions
ElseIf strShiftCode = “2” Then
sngShiftRate = displace some equipment
ElseIf strShiftCode = “3” Then
sngShiftRate = purchase new equipment
End If
Flow chart
Reference
Zak, D. (2008). Microsoft Visual Basic 2008: Reloaded. 3rd Ed. Cengage Learning.
Is this your assignment or some part of it?
We can do it for you! Click to Order!