Amazon.com Widgets Chapter 4 exercise 10 clarification
Welcome, Guest. Please login or register.
Did you miss your activation email?
June 17, 2013, 11:25:25 PM
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
|-+  Programming in Objective-C, 4th edition
| |-+  Chapter 4
| | |-+  Chapter 4 exercise 10 clarification
Pages: [1]   Go Down
Print
Author Topic: Chapter 4 exercise 10 clarification  (Read 843 times)
[I code:forFun]
Newbie
*
Posts: 12






« on: June 27, 2012, 05:45:51 AM »

The instructions for Exercise 10 in chapter 4 are not completely clear to me:
They state "The last two methods set the accumulator as well as perform the indicated operation on memory.  Have all the methods return the value of the accumulator".

Based on that, I coded my implementations as:


Code: (Objective-C)
// implemented right?
- (double) memoryAdd: (double) value
{
    memory = memory + value;
    return accumulator;
}

// implemented right?
- (double) memorySubtract: (double) value
{
    memory = memory - value;
    return accumulator;
}


... Should the accumulator, in addition to the memory, be included in the addition or subtraction of the passed-in value?  The confusing part says that the methods set the accumulator... to what?  the value passed in, or the value already in memory?  Help.  Thanks : )
« Last Edit: June 27, 2012, 05:49:05 AM by [I code:forFun] » Logged
whitestork26
Newbie
*
Posts: 12






« Reply #1 on: June 27, 2012, 10:03:43 AM »

Hi,
have a look into the board for exercises ... There are some code examples for this exercise.
http://classroomm.com/objective-c/index.php?topic=6284.msg19825#msg19825
Regards
Logged
lndjfc
Newbie
*
Posts: 2


lndjfc@yahoo.cn lndjfc lndjfc
WWW Email




« Reply #2 on: October 17, 2012, 08:43:28 PM »

Nowadays Jeggings has become the main clothing for female, as the trend of the dress tight leggings has hot loving by modern woman. Leggings can wear collocation with a lot of clothes . Women Leggings general and upper body longish child unlined upper garment, long sling, T - shirt and even the body short skirt is relatively take tone.
http://www.ms-leggings.com
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.