De Anza logo

Credit- Degree applicable
Effective Quarter: Fall 2020

I. Catalog Information


CIS 5
Swift Programming
4 1/2 Unit(s)
 

Advisory: EWRT 211 and READ 211, or ESL 272 and 273; MATH 114 or equivalent.

Lec Hrs: 48.00
Lab Hrs: 18:00
Out of Class Hrs: 96.00
Total Student Learning Hrs: 162.00

Swift is Apple’s open source language used to develop native iOS and Mac OS apps. Swift was designed to be beginner friendly. Topics covered include: native and collection data types, operators and statements, loops and branching, functions and variable scoping, modules and packages, object oriented programming, file handling, regular expressions and exception handling.


Student Learning Outcome Statements (SLO)

 

Design, code, document, analyze, debug, and test introductory level Swift programs that include Swift kits.


 

Code and debug Swift programs using Xcode Playgrounds - Apple's IDE for Swift programming.


II. Course Objectives

A.Declare and use appropriate data types for variables
B.Code statements that use expressions, operators, and built-in functions to compute values
C.Apply control structures to create loops and conditional blocks of code
D.Write code to handle data input/output through standard IO and files
E.Implement user-defined functions for modularization of code
F.Import and use common Swift kits and packages
G.Create custom classes and apply object oriented programming concepts
H.Handle exceptions in the program
I.Utilize regular expressions for text parsing

III. Essential Student Materials

 Access to a Mac computer with Xcode and Swift

IV. Essential College Facilities

 Access to a Mac computer lab with Xcode and Swift

V. Expanded Description: Content and Form

A.Declare and use appropriate data types for variables
1.Keywords and identifiers
2.Swift Data Types
a.Integers
b.Boolean
c.Double
d.Characters
3.Strings
4.Collections
a.Sequence: Tuples and Lists
b.Sets
c.Dictionaries
d.Iterate and Copy Collections
B.Code statements that use expressions, operators, and built-in functions to compute values
1.Arithmetic operators
2.Assignment operators
3.String operators and methods
4.Relational operators
5.Logical operators
6.Membership operators
C.Apply control structures to create loops and conditional blocks of code
1.Selection statements
a.if else statement
b.Nested if statements
2.Loops
a.for loop
b.while loop
c.repeat-while loop
d.Loop control statements
e.Nested loops
D.Write code to handle data input/output through standard IO and files
1.Output formatting
2.Print and input functions
3.File IO
4.File and directory access
5.Working with Core Data
E.Implement user-defined functions for modularization of code
1.Defining a function
2.Calling a function
3.Function arguments
a.Required arguments
b.Keyword arguments
c.Default arguments
d.Variable-length arguments
F.Import and use common Swift kits and packages
1.import statements
2.Namespace and scoping
G.Create custom classes and apply object oriented programming concepts
1.Creating classes and instances
2.Overloading operators and methods
3.Data hiding
4.Inheritance
5.Overriding parent class methods
H.Handle exceptions in the program
1.Standard exceptions
2.try catch blocks
3.Raise an exception
I.Utilize regular expressions for text parsing
1.Regular expression set
2.Regular expression operators
3.Regular expression patterns
4.match vs. search
5.substitute

VI. Assignments

A.Reading: Required reading from the textbook and class notes.
B.Programs: 8-10 programming homework assignments, several with 200 or more lines of code.

VII. Methods of Instruction

 Lecture and visual aids
Discussion of assigned reading
Discussion and problem solving performed in class
Quiz and examination review performed in class
Homework and extended projects
Collaborative learning and small group exercises
Collaborative projects
Laboratory discussion sessions and quizzes that evaluate the proceedings weekly laboratory exercises

VIII. Methods of Evaluating Objectives

A.Evaluation of programming assignments for correctness, use of structured design principles, documentation and efficiency
B.One or more examinations requiring programming ability to develop an algorithm, evaluate code segments, and write code using specific programming constructs presented in the course.
C.In-class lab problems, group collaborative problems, exam questions and/or online assignments or tutorials demonstrating the ability to read and analyze code through debugging and/or writing snippets of code.
D.A final examination requiring some programming ability to develop an algorithm, evaluate code segments, and write code using specific programming constructs presented in the course.

IX. Texts and Supporting References

A.Examples of Primary Texts and References
1.The Swift Apprentice Third Edition: Beginning programming with Swift 4.
by raywenderlich.com Team
Year: 2017
ISBN-10: 1942878435
ISBN-13: 978-1942878438
B.Examples of Supporting Texts and References
1.Core Data by Tutorials Fourth Edition: iOS 11 and Swift 4 edition
by raywenderlich.com Team
Year: 2017
ISBN-10: 1942878362
ISBN-13: 978-1942878360

X. Lab Topics

A.Debug code and output results of execution
B.Write and debug code that uses arithmetic expressions
C.Write and debug code that uses selection statements and decision points
D.Write and debug code using loops to implement repetition concepts
E.Write and debug code that implements multiple user defined functions
F.Write and debug code implementing file I/O
G.Write and debug code that uses collection data types
H.Write and debug code that uses exception handling
I.Write and debug code that uses regular expressions