Mandatory use Objective-C as language for the tasks
- Define a class that holds information about a mobile phone device:
- model, manufacturer, price, owner, battery characteristics (model, hours idle and hours talk) and display characteristics (size and number of colors)
- Define 3 separate classes (class
GSM
holding instances of the classesBattery
andDisplay
).
- Define several initializer methods for the defined classes that take different sets of arguments (the full information for the class or part of it
- At least 3
- Define a factory method for each initializer method
- Assume that model and manufacturer are mandatory (the others are optional). All unknown data fill with null.
- Add an enumeration
BatteryType
(Li-Ion, NiMH, NiCd, …) and use it as a new field for the batteries - Read about enumerations in Objective-C
- Add a method in the
GSM
class for displaying all information about it. - Use the
description
method
- Use properties to encapsulate the data fields inside the
GSM
,Battery
andDisplay
classes - Ensure all fields hold correct data at any given time
- Use getters and setters
- Add a class method
IPhone5S
in the GSM class that returns a ready-to-useGMS
instance
- Create an iOS application to work with the phones
- The application should contain the following scenes:
- A scene where all
GSM
s are listed- Use
UITableViewController
orUIViewController
with aUITableView
inside it - When a
GSM
is tapped show a scene with details for thisGSM
instance
- Use
- A scene with details about a
GSM
- A scene for adding new
GSM
- Mandatory fields must be filled
- Optional fields must be present, but the user may not fill them
- When a
GSM
is created, navigate to theList GSMs
scene- The new
GSM
should be there
- The new
- A scene where all
- Use extensively the storyboard and segues