Program Requirements:
1 Class
1 Methods
1 array (integer type with 150 size)
6 variables Maximum (excluding the array variable and class, method variable/parameter if any)
Narrative:
Imagine a postman delivering message in a community with one hundred fifty (150) residents.
Day by day Mr. Postman will open a mailbox, put their mail(s) closed it and open again the next mailbox.
To lessen the boredom, Mr. Postman decided one day to count all the mailbox that was opened (not all mailbox receives mail everyday) as well as the closed one, but decided to add one more trick.
He decided that if the mailbox was open he must close it and it it's close he will have to open it.
He started to open the mailbox from mailbox number 2, 4, 6, 8, 10 and so on.
After opening the entire mailbox, he opens mailbox number 3, 6, 9, 12, 15 and so on, while closing the mailbox that was previously opened.
The sequence continues until he reaches the last mailbox - 150.
After the tedious opening and closing he now started to count the total mailbox that was opened and closed!
Find out how many mailboxes was opened and closed using Mr. Postman's Method.
Layout:
St. Rose College
Educational Foundation, Inc.
Telefax No. (045) 931-1162 / src.registrar@gmail.community
Number of Mailbox : 150
Total Number of Open Mailbox : ???
Total Number of Close Mailbox : ???
We Survived OOP!