Mobile Application Development for Android I

list Preamble

info Description

This course is a cross-platform study of the creation of mobile applications using the Java-based Android ecosystem, while learning core programming concepts and engineering methodologies using the Kotlin programming language. Topics include functions, classes, objects, and interfaces; lambdas; the Kotlin type system; and, concurrency, among other topics. This course also teaches students how to create optimal digital-device user experiences (ux) through user interface (ui) design principles using color, layout, rhythm, balance, and typography. Prerequisite: cs 114, it’s equivalent, or permission from the instructor.

list Learning Outcomes

Upon successful completion of this course, students will be able to...

file_download Software Requirements

Integrated Development Environment (Mac, Windows, Linux, and ChromeOS)

We use Google’s Android Studio to develop our Android applications. Android Studio is cross-platform, with versions for Windows, macOS, Linux, and ChromeOS. You may download it from here.

Text Editor (Mac, Windows, Linux)

The code you write will require a text editor. Although there are many on the market, such as Sublime Text (nagware), for example, vs Code (open source) is the only editor supported in class. Download the Linux, Windows, or macOS version from https://code.visualstudio.com/.

Kotlin VS Code Extension (Mac, Windows, and Linux)

In cases where you’ll be writing Kotlin in vs Code, install Mathias Frohlich’s Kotlin Language extension. Search for mathiasfrohlich.Kotlin in vs Code’s extensions panel.

Git Client (Mac, Windows, Linux)

All in-class examples, assignments, and help is done via GitHub. Download the client for your computer here.

Fonts (Mac, Windows, and Linux)

In addition to the stock issue, monospace/fixed-width fonts included with your os, here are a few more fonts to explore in your text editors:

IBM Plex | Ubuntu Mono | Fira Mono | Anonymous Pro | Inconsolata

menu_book Textbook

Kotlin in Action

[Cover of the 2ᴺᴰ edition of Kotlin in Action.]

calendar_month Schedule

Important Notes

The University treats absences related to covid-19 as excused absences. Consequently, you’ll need to get notes from someone in class, as mentioned in the section of this syllabus marked Advice on Succeeding in Class. There will not be a streaming video option for anyone missing class.

Notable Dates

The weekly schedule for the semester, complete with topics and readings.
Week Class Topics Homework
1 Mon
  • Thorough syllabus breakdown
  • Introduction to Android Studio and the mobile app development toolchain
  • Software installfest
  • Carefully re-read the syllabus to ensure you’re aware of all the requirements for the course.
  • If you don’t already have a GitHub account, open one before the next class.
  • 2.1 Basic Elements: Functions and Variables
Wed
  • What is Kotlin, why use it, and why aren’t we just using Java?
  • Review Google’s and JetBrains’ Kotlin style guides. (We use Google’s in class.)
  • Playing with Kotlin immediately, via Kotlin Playground
  • Android Studio and IntelliJ
  • 2.1.1 Writing your first Kotlin program: “Hello, world!”
  • 2.1.2 Declaring functions with parameters and return values
  • 2.1.3 Making function definitions more concise by using expression bodies
  • 2.1.4 Declaring variables to store data
  • 2.2 Encapsulating behavior and data: Classes and properties
2 Mon
No Class
None
Wed
  • 2.1.5 Marking a variable as read only or reassignable
  • 2.1.6 Easier string formatting: String templates
  • 2.2.1 Associating data with a class and making it accessible: Properties
  • 2.2.2 Computing properties instead of storing their values: Custom accessors
  • 2.3 Representing and handling choices: Enums and when
3 Mon
  • 2.2.3 Kotlin source code layout: Directories and packages
  • 2.3.1 Declaring enum classes and enum constants
  • 2.3.2 Using the when expression to deal with enum classes
  • 2.3.3 Capturing the subject of a when expression in a variable
  • 2.3 Representing and handling choices: Enums and when (continued)
Wed
  • 2.3.4 Using the when expression with arbitrary objects
  • 2.3.5 Using the when expression without an argument
  • 2.3.6 Smart casts: Combining type checks and casts
  • 2.3.7 Refactoring: Replacing an if with a when expression
  • 2.3 Representing and handling choices: Enums and when (continued)
4 Mon
  • 2.3.8 Blocks as branches of if and when
  • 2.4.1. Repeating code while a condition is true: The while loop
  • 2.4.2. Iterating over numbers: Ranges and progressions
  • 2.4.3. Iterating over maps
  • 2.4 Iterating over things: while and for loops
Wed
  • 2.4.4. Using in to check collection and range membership
  • 2.5.1 Handling exceptions and recovering from errors: try, catch, and finally
  • 2.5.2 Using try as an expression
  • 3.2.1 Named arguments
  • 2.5 Throwing and catching exceptions in Kotlin
  • 3.1 Creating collections in Kotlin
5 Mon
  • 3.2.2 Default parameter values
  • 3.2.3 Getting rid of static utility classes: Top-level functions and properties
  • 3.3.1 Imports and extension functions
  • 3.3.2 Calling extension functions from Java
  • Observing good style and proper coding practices
  • 3.2 Making functions easier to call
Wed
  • 3.3.3 Utility functions as extensions
  • 3.3.4 No overriding for extension functions
  • 3.3.5 Extension properties
  • 3.4.1 Extending the Java collections api
  • Assignment 1 due
  • 3.3 Adding methods to other people’s classes: Extension functions and properties
6 Mon
  • 3.4.2 Varargs: Functions that accept an arbitrary number of arguments
  • 3.4.3 Working with pairs: Infix calls and destructuring declarations
  • 3.5.1 Splitting strings
  • 3.5.2 Regular expressions and triple-quoted strings
  • 3.4 Working with collections: varargs, infix calls, and library support
  • 3.5 Working with strings and regular expressions
Wed
  • 3.5.3 Multiline triple-quoted strings
  • 4.1.1 Interfaces in Kotlin
  • 4.1.2 Open, final, and abstract modifiers: Final by default
  • 4.1.3 Visibility modifiers: Public by default
  • 3.6 Making your code tidy: Local functions and extensions
  • 4.1 Defining class hierarchies
7 Mon
  • 4.1.4 Inner and nested classes: Nested by default
  • 4.1.5 Sealed classes: Defining restricted class hierarchies
  • 4.2.1 Initializing classes: Primary constructor and initializer blocks
  • 4.2.2 Secondary constructors: Initializing the superclass in different ways
  • 4.2 Declaring a class with nontrivial constructors or properties
Wed
  • 4.2.3 Implementing properties declared in interfaces
  • 4.2.4 Accessing a backing field from a getter or setter
  • 4.2.5 Changing accessor visibility
  • 4.3.1 Universal object methods
  • 4.3 Compiler-generated methods: Data classes and class delegation
8 Mon
  • 4.3.2 Data classes: Autogenerated implementations of universal methods
  • 4.3.3 Class delegation: Using the by keyword
  • 4.4.1 Object declarations: Singletons made easy
  • 4.4.2 Companion objects: A place for factory methods and static members
  • 4.4 The object keyword: Declaring a class and creating an instance, combined
Wed
  • 4.4.3 Companion objects as regular objects
  • 4.4.4 Object expressions: Anonymous inner classes rephrased
  • 5.1.1 Introduction to lambdas: Blocks of code as values
  • 5.1.2 Lambdas and collections
  • 4.5 Extra type safety without overhead: Inline classes
  • 5.1 Lambda expressions and member references
9 Mon
  • 5.1.3 Syntax for lambda expressions
  • 5.1.4 Accessing variables in scope
  • 5.1.5 Member references
  • 5.1.6 Bound callable references
  • 5.2 Using Java functional interfaces: Single abstract methods
Wed
  • 5.2.1 Passing a lambda as a parameter to a Java method
  • 5.2.2 sam constructors: Explicit conversion of lambdas to functional interfaces
  • 5.4.1 Performing multiple operations on the same object: with
  • 5.4.2 Initializing and configuring objects: The apply function
  • Assignment 2 due
  • 5.3 Defining sam interfaces in Kotlin: fun interfaces
  • 5.4 Lambdas with receivers: with, apply, and also
10 Mon
  • 5.4.3 Performing additional actions with an object: also
  • 6.1.1 Removing and transforming elements: filter and map
  • 6.1.2 Accumulating values for collections: reduce and fold
  • 6.1.3 Applying a predicate to a collection: all, any, none, count, and find
  • 6.1 Functional apis for collections
Wed
  • 6.1.4 Splitting a list into a pair of lists: partition
  • 6.1.5 Converting a list to a map of groups: groupBy
  • 6.1.6 Transforming collections into maps: associate, associateWith, and associateBy
  • 6.1.7 Replacing elements in mutable collections: replaceAll and fill
  • 6.1 Functional apis for collections (continued)
11 Mon
  • 6.1.8 Handling special cases for collections: ifEmpty
  • 6.1.9 Splitting collections: chunked and windowed
  • 6.1.10 Merging collections: zip
  • 6.1.11 Processing elements in nested collections: flatMap and flatten
  • 6.1 Functional apis for collections (continued)
Wed
  • 6.2.1 Executing sequence operations: Intermediate and terminal operations
  • 6.2.2 Creating sequences
  • 7.1 Avoiding NullPointerExceptions and handling the absence of values: Nullability
  • 7.2 Making possibly null variables explicit with nullable types
  • 7.3 Taking a closer look at the meaning of types
  • 7.4 Combining null checks and method calls with the safe call operator: ?.
  • 6.2 Lazy collection operations: Sequences
12 Mon
  • 7.5 Providing default values in null cases with the Elvis operator: ?:
  • 7.6 Safely casting values without throwing exceptions: as?
  • 7.7 Making promises to the compiler with the non-null assertion operator: !!
  • 7.8 Dealing with nullable expressions: The let function
  • Review notes
Wed
  • 7.9 Non-null types without immediate initialization: Late-initialized properties
  • 7.10 Extending types without the safe-call operator: Extensions for nullable types
  • 7.11 Nullability of type parameters
  • 7.12 Nullability and Java
  • Review notes
13 Mon
  • 7.12.1 Platform types
  • 7.12.2 Inheritance
  • 8.1.1 Representing integers, floating-point numbers, characters, and Booleans with primitive types
  • 8.1.2 Using the full bit range to represent positive numbers: Unsigned number types
  • 8.1 Primitive and other basic types
Wed
  • 8.1.3 Nullable primitive types: Int?, Boolean?, and more
  • 8.1.4 Kotlin makes number conversions explicit
  • 8.1.5 Any and Any?: The root of the Kotlin type hierarchy
  • 8.1.6 The Unit type: Kotlin’s void
  • Assignment 3 due
  • 8.1 Primitive and other basic types (continued)
14 Mon
No class
None
Wed
No class
None
15 Mon
  • 8.1.7 The Nothing type: “This function never returns”
  • 8.2.1 Collections of nullable values and nullable collections
  • 8.2.2 Read-only and mutable collections
  • 8.2.3 Kotlin collections and Java collections are deeply related
  • 8.2 Collections and arrays
Wed
  • 8.2.4 Collections declared in Java are seen as platform types in Kotlin
  • 8.2.5 Creating arrays of objects and primitive types for interoperability and performance reasons
  • 8.2 Collections and arrays (continued)
16 Mon
  • Class evaluations
  • Open lab
  • Final project due Monday, 16 December 2024, at 5:00 pm
Enjoy your break!
Wed

assignment Assignments

The assignments portion of your final grade consists of three homework-type assignments and one final project. (See the Grading Formula section to learn what percentage of your final grade each is worth.)

  1. Assignment I
  2. Assignment II
  3. Assignment III
  4. Final Project

info Grading Formula

Your grade for this course will be computed using the following formula:

  1. Assignments (45%)
    • Assignment I — 15%
    • Assignment II — 15%
    • Assignment III — 15%
  2. Final project (45%)
  3. Participation (10%)

balance Class Policies

psychology No AI Use in Class

The use of generative ai tools is strictly forbidden in this course. All programming assignments — and any labs — associated with this course must be completed without the assistance of ai-generated content. This policy is in place to ensure that the work submitted is authentically yours and reflects your personal understanding and capabilities. Violations of this policy will be considered academic dishonesty and will be subject to disciplinary actions as outlined in the university’s academic honesty policy.

warning Academic Honesty

Cheating of any kind will not be tolerated in this course; make certain that all the work you submit is your own. Refresh your understanding of the college’s policy on academic honesty.

accessible Students with Disabilities

If you have a documented disability for which you are requesting accommodation, you are encouraged to contact Access-Ability Services as soon as possible by calling 860.768.4312, emailing tlopez@hartford.edu, or by stopping by the Access-Ability Services office in Auerbach Hall, Room 209. If your request for accommodations is approved, an accommodation letter will be emailed to your instructor(s) upon your request. Please discuss your accommodations with the instructor as soon as possible to make appropriate arrangements. Note: Student requests for accommodations must be filed each semester. Visit https://www.hartford.edu/academics/academic-support/accessibility-services/ and click the “Registering” link for more info and a link to a video that walks you through the process.

balance Title IX and Sexual Assault

Sexual violence and other forms of sexual misconduct and harassment, including stalking and intimate partner violence, are prohibited under Title ix, federal and state law, and University of Hartford policy. Information on the University’s policies against sexual violence can be found at https://www.hartford.edu/about/policies/title-ix/. Resources regarding sexual violence can be found at https://www.hartford.edu/about/policies/title-ix/on-off-campus-resources.aspx

Note: University of Hartford faculty, staff, and ras are required to report incidents of sexual misconduct to the Title ix Office (title9@hartford.edu). For further information on The University’s policies and resources, please contact Jason Martinez (860.768.5255; jamartine@hartford.edu) or Justin Bell (860.768.4880; jbell@hartford.edu).

psychology Mental Health and Well-Being

Mental Health is an important aspect of students’ well-being and integral to positive academic experiences and success. If, during the semester, you experience difficulties and would like support, consider contacting the University of Hartford’s caps, or Counseling and Psychological Services, which offers a range of short-term counseling services available to full-time undergraduate students at no additional cost, and to part-time undergraduate and graduate students for a small fee.

caps is located in Gengras Student Union, Room 313 map, and can be reached by calling 860.768.4482 or emailing Liz Inkel at inkel@hartford.edu. Office hours are Monday – Friday, 8:30 AM – 4:30 PM.

info Advice on Succeeding in Class

Read over the following to understand procedures for maximizing your chances of succeeding in class.

door_front Office Hours

I meet students on an appointment basis via video conference during the times listed here. (Click here for videoconferencing details.) Other times on Thursdays and Fridays are available, also. Email vanegas@hartford.edu to make an appointment.

contact_mail Contact

Nowadays, I only use email for emergency situations, such as a pet emergencies, personal tragedies, etc. For matters related to our course, you’re advised to see me before or after class, during my office hours, or by appointment. My contact info is listed in the Preamble.