Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

DEV-learn-co-curriculum/objc-deli

Repository files navigation

Deli Counter - Take a Number

Instructions

A pretty important deli needs somebody to program the "Take a Number" feature for their counter.

At the beginning of the day, the deli is empty and is represented by an empty array.

Example:

Write all of your code in FISAppDelegate.m. All method signatures should be added to 'FISAppDelegate.h'.

  1. Build a method that a new customer will use when entering the deli. The method, takeANumberWithDeliLine:Name:, should accept the current line in NSMutableArray format, the new person's name, and return the updated line. Also, the method should NSLog their position in line. And don't go being too programmer-y and give them their index. These are normal people. If they are 7th in line, tell them that. Don't get their hopes up by telling them they are number 6 in line.

  2. Build a method nowServingWithDeliLine:. This method also should take a NSMutableArray deliLine as an argument. This method should return the updated NSMutableArray deli Line and NSLog the name of the next person in line after removing them from the line. If there is nobody in line, it should NSLog that "There is nobody waiting to be served!" and return nil

  3. Build a method deliLine: that takes an NSMutableArray deliLine as an argument, and returns the current line (returned as an NSString). If there is nobody in line, it should return "The line is currently empty."

Make sure to read the tests before you get started to ensure you code your methods to their exact specifications!

Learn.co resource

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6