Amazon.com Widgets exercise 7 flowchart
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 23, 2013, 11:24:50 AM
Home Help Search chat Login Register   
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+  Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+  Old Stuff
| |-+  Answers to Exercises
| | |-+  Chapter 8
| | | |-+  exercise 7 flowchart
Pages: [1]   Go Down
Print
Author Topic: exercise 7 flowchart  (Read 2212 times)
Still
Newbie
*
Posts: 1






« on: June 02, 2010, 07:36:23 PM »

First of all, i would like to congratulate & thank you Mr. Kochan, for such a great book and those huge efforts you're doing for all of us to learn the language.

Well, am having abit of difficulty getting the concept/theory/method/flowchart to use to solve exercise 6 as amn't sure how the intersection rectangle to be determined in the first place, i tried to look at others solutions yet am still confused on how it works..

Any hints?

Thanks.
« Last Edit: August 19, 2011, 10:39:02 AM by fujilla » Logged
skochan
Administrator
Hero Member
*****
Posts: 3104







« Reply #1 on: June 03, 2010, 01:46:20 PM »

Thanks for the compliments! Smiley

I think the best suggestion would be to take a piece of graph paper and draw pairs of rectangles with difference scenarios.  In one scenario, have them overlap, in another have them not overlap.  For the overlap scenarios, consider different configurations as well.  Label the rectangles with their origins, and their widths and heights.   Next, try to figure out the criteria that needs to be met in order for the rectangles to intersect.   So for example, if the x origin of one rectangle plus its width is less than the x origin of the other rectangle, they can't intersect.   You can make the same conclusion with the y origin and its height.  Does that make sense?

Give that a shot and then post here again and let me know how it's going.

Cheers,

Steve Kochan
« Last Edit: August 19, 2011, 10:39:14 AM by fujilla » Logged
RahulVarshney
Newbie
*
Posts: 4






« Reply #2 on: October 04, 2010, 04:38:44 PM »

I have spent two days on this exercise! But with this added information, I am going to try just a little bit longer. Thank you for the book! Will post a review on Amazon shortly.
« Last Edit: August 19, 2011, 10:39:26 AM by fujilla » Logged
skochan
Administrator
Hero Member
*****
Posts: 3104







« Reply #3 on: October 04, 2010, 09:59:03 PM »

Good luck!  Some of the exercises are tougher than others; this is one of the tougher ones!

Cheers,

Steve
« Last Edit: August 19, 2011, 10:39:39 AM by fujilla » Logged
Pages: [1]   Go Up
Print
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.