Giter Site home page Giter Site logo

ios-exercises's Introduction

ios-exercises

  • BlocExercises.xcodeproj contains the Xcode project with iOS exercises.
  • Specific assignments are in Exercise Descriptions.

ios-exercises's People

Contributors

areiterb avatar cbeck avatar codehearted avatar ezrow avatar falkobuttler avatar foxyblocks avatar getaaron avatar steveschauer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios-exercises's Issues

Answer alredy written in MarysAppleHandler.m for last two tests

https://github.com/Bloc/ios-exercises/blob/master/BlocExercises/BlocExercises/MarysAppleHandlerTests.m

- (void)testThatPriceOfDiscountedVodkaIs18Dollars {
    self.appleHandler.getsDiscount = YES;
    NSUInteger cost = [self.appleHandler dollarCostForAppleFlavoredVodka];
    XCTAssertEqual(cost, 18, @"Discounted vodka should be $18.");
}

- (void)testThatPriceOfUndiscountedVodkaIs24Dollars {
    NSUInteger cost = [self.appleHandler dollarCostForAppleFlavoredVodka];
    XCTAssertEqual(cost, 24, @"Undiscounted vodka should be $24.");
}

https://github.com/Bloc/ios-exercises/blob/master/BlocExercises/BlocExercises/MarysAppleHandler.m

- (NSUInteger) dollarCostForAppleFlavoredVodka {
    /* WORK HERE */

    NSUInteger cost = 24;

    if (self.getsDiscount) {
        cost *= .75;
    }

    return cost;
}

If/Else checkpoints/494 - Wrong Highlighting

I noticed on the If/Else checkpoint that the text ask you to replace the Yes with a No but the highlighting is both red

Should the No line be highlighted green to indicate that the Yes was changed to No?

screen shot 2014-08-05 at 10 22 43 pm

StringCheese.m has not needed if/else statement

In the cheeseNameWithoutCheeseSuffix method, an if statement was added to see if it contained cheese.

I use this as a good place to explore the documentation with my students, and there's a method in NSString that's designed to handle this exact problem, without an if statement. To me, the best answer would be as follows:

NSString *nameNoCheese = [cheeseName stringByReplacingOccurrencesOfString:@" cheese" withString:@"" options:NSCaseInsensitiveSearch range:NSMakeRange(0, cheeseName.length)];

Can we remove the if statement so both answers could be acceptable?

Thanks!

Comment in StringCheese.m needs to be updated.

There is a comment (line 30 and 47) in StringCheese.m stating you will learn more about if/else in the next checkpoint, but the next checkpoint is on Equality. This might need to be updated to state you will learn about "if/else" in a "future" checkpoint.

    /*
     (You will learn more about if/else statements in the next checkpoint.)
     */

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.