2.2
2.2.1 Functions
2.2.2 define functions
2.2.3 implementation and interface:
1. Create an interface file for the Unit
2. Create an implementation file
3. You need to modify the file that calls the function to include the interface file of the unit.
Note: If the interface file is part of your project or you have created it, use quotation marks when specifying the Import Statement. Otherwise, if the interface file is a third-party framework or a part of the framework provided by Apple, brackets should be used.
2.2.4. link implementation file.
2.3 Control Program flow. Two methods: 1. condition control 2. loop control.
2.3.1 use conditional statement 1. if-else 2. Use the Three-object operator. 3. Use switch 4. Select conditional statements
2.3.2 loop statement: for Loop, while loop. Do-while LOOP, enhanced for Loop
2.4 create a calculator.
Note: similar to java, java