... | @@ -5,6 +5,15 @@ https://www.tutorialspoint.com/objective_c/index.htm |
... | @@ -5,6 +5,15 @@ https://www.tutorialspoint.com/objective_c/index.htm |
|
## You should do the following:
|
|
## You should do the following:
|
|
You should create an iOS application in Xcode, written in Objective-C. It should contain 2 classes: `Organization` and `Employee`, both of each are subclasses of `NSObject`.
|
|
You should create an iOS application in Xcode, written in Objective-C. It should contain 2 classes: `Organization` and `Employee`, both of each are subclasses of `NSObject`.
|
|
|
|
|
|
|
|
`Employee` should have the following properties:
|
|
|
|
|
|
|
|
* Private “firstName” and “lastName”, which are of type `NSString`.
|
|
|
|
* Public “salary” of type `int`.
|
|
|
|
* Public readonly property “fullName”, which returns the conjuction of first name and last name.
|
|
|
|
|
|
|
|
And the following methods:
|
|
|
|
* Public `initWithFirstName:lastName:salary`: initializer method, which accepts first name, last name and salary as input parameters.
|
|
|
|
|
|
`Organization` should have the following properties:
|
|
`Organization` should have the following properties:
|
|
|
|
|
|
* Public “name” of type `NSString`.
|
|
* Public “name” of type `NSString`.
|
... | @@ -18,16 +27,6 @@ And the following methods: |
... | @@ -18,16 +27,6 @@ And the following methods: |
|
* Public `employeeWithLowestSalary` method, which returns one employee with the lowest salary in the organization.
|
|
* Public `employeeWithLowestSalary` method, which returns one employee with the lowest salary in the organization.
|
|
* Public `employeesWithSalary:` method, which accepts one argument of type int - salary - and returns all employees with given salary as an array.
|
|
* Public `employeesWithSalary:` method, which accepts one argument of type int - salary - and returns all employees with given salary as an array.
|
|
|
|
|
|
|
|
|
|
`Employee` should have the following properties:
|
|
|
|
|
|
|
|
* Private “firstName” and “lastName”, which are of type `NSString`.
|
|
|
|
* Public “salary” of type `int`.
|
|
|
|
* Public readonly property “fullName”, which returns the conjuction of first name and last name.
|
|
|
|
|
|
|
|
And the following methods:
|
|
|
|
* Public `initWithFirstName:lastName:salary`: initializer method, which accepts first name, last name and salary as input parameters.
|
|
|
|
|
|
|
|
Application should create one organization and multiple employees, which are added to the organization. Than all of the methods should be demonstrated. Everything should be logged to `NSLog`.
|
|
Application should create one organization and multiple employees, which are added to the organization. Than all of the methods should be demonstrated. Everything should be logged to `NSLog`.
|
|
|
|
|
|
## You should be able to answer the following questions:
|
|
## You should be able to answer the following questions:
|
... | | ... | |