William Findley
Unit 4
Short answer
1. How do modules help you reuse code in a program? MODULES ALSO REDUCE THE DUPLICATION OF CODE WITHIN A PROGRAM..THIS BENEFIT OF USING MODULES IS KNOWN AS code reuse BECAUSE YOU ARE WRITING THE CODE TO PERFORM A TASK ONCE AND THEN REUSING IT EACH TIME YOU NEED TO PERFORM A TASK.
2. Name and describe the two parts that a module definition has in most languags.
A header and a body. Header indicates starting point, and the body is a list of statements.
3. When a module is executing, what happens when the end of the module is reached?
It’s executed and returned back to the point in main program where it was sidetracked from.
4. What is a local variable? What statement are able to access
…show more content…
Module main()
Declare real purchase
Display “Enter the amount of purchase.”
Input purchase
Call Module totalState(purchase)
Call Module totalCounty(purchase)
Declare real totalTax
Declare real totalSale
Set totalTax = totalState + totalCounty
Set totalSale = purchase + totalTax
Display “Your amount of purchase is “, purchase
Display “Your total state tax is “, totalState
Display ”Your total county tax is “, totalCounty
Display “Your total tax is “, totalTax
Display “Your total of your sale is “, totalSale
End Module
Module totalState (real Ref purchase)
Set totalState sales tax = purchase * 0.04
End Module
Module totalCounty(real Ref purchase)
Set totalCounty sales tax = purchase * 0.02
End
These snacks are offered freely and never forced upon a child. We’re not to bring in unhealthy snacks for ourselves or eat in front of the children, and if we have unhealthy food it must be kept in a cupboard hidden and put away.
Assess strategies and methods used to minimise the harm to children, young people and their families where abuse is confirmed (M3). Justify responses where child maltreatment or abuse id suspected or confirmed, referring to current legislation and policies (D2)
I have made some progress regarding my action plan. I haven’t attended any open days as yet but planning to do so in June so far and completed my personal statement. My first action plan regarding higher education was to get distinctions in all my assignments. So
I completed the health promotion and had personal achievements, I improved my confidence levels in conducting this health promotion as I was able to stand in front of a large number of individuals and speak loudly and clearly, I was unable to do this previously and was worrying about it beforehand. Another personal achievement was that I was able to work well within a team and effectively produce a health promotion to deliver to the participants. I was able to gain more knowledge on the topic myself, I knew a fair bit about this certain topic but I believed that I increased my knowledge. We did this by allocating tasks to each individual after deciding our aims and objectives. There was also a participants achievement, I believe that in doing the health promotion we were able to give the participants confidence if they were to conduct a similar promotion.
Physical abuse is defined as the use of physical force that may result in bodily injury, physical pain, or impairment. Physical abuse may include hitting, beating, pushing, shoving, shaking, slapping, kicking, pinching, and burning. Also, inappropriate use of drugs and physical restraints, force-feeding, and physical punishment of any kind also are examples of physical abuse.
Tuskegee – The doctors violated this principle by not informing the study subjects of the details of the study itself. The subjects were informed they were going to be treated for “bad blood” (CDC, 2015). At the time “bad blood” could have meant syphilis or it could have meant anemia or fatigue. None of the patients received treatment to cure their illness. Additionally, none were ever informed that they were in fact part of a study to document how syphilis progresses when left untreated. These were autonomous men who had vital information withheld from them while being subjects in a research study.
Tissues are groups of cells, which are placed together to achieve a common function. There are four main types of tissue: Epithelial, connective, muscle and nervous. Most of these tissues are found in our bodies, however the epithelial tissue is covered all over the surfaces of the body.
1) You can call the module several times instead of writing it out each time.
When PHIL runs, it has three distinct stages that the code runs through. First is the initialization stage. This is where the code that needs to be set-up first runs. The next stage is the execution stage, which is arguably the most important stage. This is where the majority of the code executes. Any code in the execution stage repeats until the user terminates it. The final stage is the termination stage, which happens after the user terminates the execution stage. This is where all tasks stop and any code which needs to complete, can do so safely.
When PHIL is run it has three distinct stages that the code runs through. First is the initialization stage. This is where the code that needs to be set up first is run. The next stage is the execution stage, which is arguably the most important stage. This is where the majority of the code is executed. Any code in the execution stage is repeated until the user terminates it. The final stage is the termination stage, where all tasks are stopped and any code which needs to be closed out can be done safely after user termination.