hierarchy and modules

hello I am very frustrated please help, I am taking a principles of programming course based on c++ its done online so there's barely any explanation or help from instructor I don't even know where to begin.
this link has the homework question... please help!! its only the beginning, we haven't learned the language exactly yet this is just the principles of programming based on c++.
https://answers.yahoo.com/question/index?qid=20140529061406AAjGYSK
I guess this could be tricky if you havent wrote code before

Your chart will be something like this:

1
2
3
4
5
       Box 1 (main)

Box 2        Box 3       Box 4
House-       Detail      end-of-job
keeping


Boxes 2,3, and 4 are connected to main (They are also on the same lair)
They are not connected to each other


Why? When you program in C++, the entry point is a function called "main"
The normal flow for the program would go through all the instructions until you hit the end of main(return).

1
2
3
4
5
6
7
8
9
10
11
12
int main() {
line 1
2
3
4
5
6
7
8
9
.....
return 0;


If you were to keep all the code in the main module (page) then it would become very lengthy, to help reduce this we create new modules(pages) that help us divide our code.

Now that we have new modules, we can change the flow of control from main to housekeeping

1
2
3
4
5
6
7
8
9
10
11
12
13
int main() {
line 1
2
3
4
HouseKeeping() 
 // Main gives control to HouseKeeping, until control is returned
6
7
8
9
.....
return 0;
Topic archived. No new replies allowed.