Highlights
1. Introduction
To complete this task, you need to be able to demonstrate that you have developed a good understanding of the concepts associated with control flow, our week 5 topic and an important component of Structured Programming.
For this task, you will need to explore the diagramming method of flow charts and how they can be used to visually describe the paths we can take through a program. As part of this task, you will produce some code that matches given flow charts, and visually describe provided code by creating your own flow charts.
2. Getting Started
To get started for this task, you need to understand what the intended program is for this task – this is important as we’ll be rewriting this program using different control flow structures to change the behaviour of the program. The topic of Control Flow from week 5 in the unit contained an activity for a program that calculates the area of a rectangle. The width and height of a rectangle provided by the user needs to be checked to make sure they are valid – for example, we cannot have a negative width!
One possible version of this program can be seen below:
1. Your Task Requirements
For this task, you need to demonstrate your understanding of control flow and flow charts by redesigning the above program to use different combinations of control flow behaviour. Below are three flow chart tasks – attempt all of them, starting with the first.
Flow Chart Task 1
The first version of the program used two separate if statements to check the width and height. Our first rewrite of this program is to change it to use one if statement.
Below is a flow chart that shows the new program control flow:
For this first task, modify the starting code so that it matches the above diagram correctly. Include code comments that explain what changes were required compared to the original version of the code.
Flow Chart Task 2
The second version of this program has already been created below:
Again, if required you can write and compile this code yourself to confirm it works.
For this part of the task, you need to design a flow chart that visually describes the control flow of this new version of the program. Use online diagramming software such as app.diagrams.net and follow the same formatting rules that have been shown in the flow charts in this document. Include a screenshot of your final flow chart in the Task Resource document.
Flow Chart Task 3
The previous versions of this task have only used a selection statement to create split paths through the program, but the program is currently unable to go back and let the user try again with their input. The final version of this program is to demonstrate how to use and describe repetition statements.
Modify the area rectangle program given so that it uses at least one repetition statement. This repetition must allow the user to fix the mistake of entering an invalid width or an invalid height for a rectangle (i.e. only numbers above zero are valid numbers!).
Write the code for this version of the program and diagram your design using a flow chart. Add some code comments to the code to explain your design decisions.
Answering the Questions
Download the Task Resources from OnTrack. You will find the button to download these in the Task Details page, as shown below.
This IT and Computer Science has been solved by our PhD Experts at My Uni Paper. Our Assignment Writing Experts are efficient in providing a fresh solution to this question. We are serving more than 10000+ Students in Australia, the UK, and the US by helping them to score HD in their academics. Our Experts are well-trained to follow all marking rubrics and referencing styles.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.