Choose one of the methods that requires a decision be made by the program
Choose one of the methods that requires a decision be made by the program
In information systems, a program often needs to respond differently in different circumstances. For example, a system monitoring blood pressure would need to respond differently for low, normal, and high blood pressures. Or, a course registration system would need to notify a student if a class was full.
Such differentiated responses utilize if-then or case statements within class methods. You implemented an example if-then statement in Benchmark 3. You have already incorporated or will be incorporating this decision-based logic into a class method in Benchmark 4. Many class methods and programs in general make extensive use of decision-based logic to differentiate what the program will do for various cases.
As one example, the monitor blood pressure method in the Vitals class needs to check blood pressure on a regular basis, update the current blood pressure properties, and give a warning if there is a low or high reading. The decision point is needed to give that warning. Pseudo-code for that decision might be:
If systolic_pressure < 85 or diastolic_pressure < 50 then ‘identifies low condition
vitals_warning(lowbp) ‘starts the vitals_warning method with lowbp as "You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.
Discount Code: CIPD30
Click ORDER NOW..


