Assignments
- Java style guide to which all submitted code should conform.
Remote CSIL Access
- CSIL labs are open for students to use who need to use the lab; online access may be preferable.
- Official CSIL Linux remote access guide
- Email [helpdesk@cs.sfu.ca] if you have any problems.
CSIL Android SDK Info (click to expand!)
- The Android SDK folder in your /home/ directory redirects to a scratch space (on the network) which should have enough free space for you to allow Android Studio to download and install the SDK and Android API versions. THIS MIGHT TAKE ~30 MINUTES.
- When you run Android Studio, if it asks you to pick a location for the SDK, you may have some old configuration data. Try deleting the following folders in your /home/ (after backing up anything important) and logging out/in again: Android/, AndroidStudioProjects/, .AndroidStudio*, .android
- Once installed, you can update/modify your Android SDK installation as needed.
- If Android Studio locks up (while building, or while browsing /home/ folder, for example), then from a terminal run:
$ ps -A | grep Java
$ kill ###
(where ### is the process ID shown by ps)
SFU's Firewall & GitLab
Info on setting up GitLab from off campus (click to expand!)
git clone git@csil-git1.cs.surrey.sfu.ca:...
Assignment 1
- Assignment description
- Provided files, such as sample output and partial text-UI (which may be used as a basis for your solution)
- Marking guide
- Due Date
- Sunday Oct 2nd by 11:59pm; same week as Assignment 2 is due! Plan ahead!
- Aim to be done by ~Sept 19th so you have time to do As2.
- Resources
- [Useful!] Brief notes on setting up the project for Plain Old Java in Android Studio and troubleshooting!
- Readings: Suggested free book chapter on learning Java
- Intro Java programming demos
Plain Old Java with JUnit 5 in Android Studio (old video for Java, old video for JUnit 5)
Java Basics: main(), functions, if, for loop
Data class (fields, constructor, toString()...)
ArrayList and For-Each loop
Model/View Separation
JUnit 5: Testing
- [Optional] Suggested Android Videos
- Git in Android Studio: Creating a GitLab repo, SSH key, and initial push of code
- Creating a button: Create simple project and add a button calling Log and Toast
- TextView and strings.xml: Move text to strings.xml, use Java to access string and display on TextView
- UI & model separation: Separate business logic (Java classes) from the UI (Activities); a pet rock
- Debugging in Android Studio
- Submit via CourSys
- See assignment submission directions for how to create/test ZIP file
Assignment 2
- Assignment description
- [UPDATED] Oct 1: Changed assignment to explicitly mention recalculating scores on the new game screen.
- Marking guide
- Due Wednesday Oct 5th by 11:59pm; same week as Assignment 1 is due! Plan ahead!
- For Android tutorials, see video tutorials. Here are some highlights:
- Getting started with Android
Creating a project with a button, shows Log and Toast
Using EditText and TextView, shows button with lambda-function
TextView and use strings.xml for text
Constraint Layout
Separate business logic (model) from UI (view) -- recommended - Needed topics
Git in Android Studio: SSH key, initial push
Singleton pattern to share object reference across multiple activities [Required Knowledge]
Floating Action Button & Material Design icons
Debugging in Android Studio
ListView with text from an array
Switching activities [Required Knowledge]
AppBar (also called ToolBar or ActionBar)
TextWatcher (for detecting text changes in an input field; not by Dr. Brian) - Topics for "optional" features
Passing data to an Activity using Extras and Intents [Required Knowledge]
Complex ListView with text and images from a list of objects (source code).
- Getting started with Android
- Suggested reading: Chapters 1-9 of Big Nerd Ranch book
- Submit via CourSys
- See assignment submission directions for how to create/test ZIP file.
Assignment 3
- Assignment description
- Requirements document
Video intro to As3 (from last year) - Marking guide
- Android Videos
Dynamic Buttons and Images: populating table of buttons at runtime with text and images [source code]
Updated the source code to compile with latest Android Studio.
Hint: If your button sizes change when adding text, set the text size in the button before you lock their sizes.
Forcing activity orientation (to portrait or landscape mode).
Resource by Name: accessing a resource (image) by its name, not its ID.
Radio Buttons: build radio buttons from data in a resource file.
Options Screen: create custom options/settings screen with SharedPreferences.
Dialog (AlertDialog): create a custom AlertDialog and interacting with parent Activity. - GitLab Videos
Git Merge Conflicts in Android Studio: Resolving merge conflicts.
GitLab workflow with Merge Request: Creating an issue, feature branch, switching branches, commit/push, merge request.
GitLab workflow with Conflicting Changes: Resolving conflicting changes before submitting a merge request in Android Studio with GitLab. - Possible Images
- Commit your code to a GitLab repository then create a 'tag' for the code you want to submit. Submit this tag and GitLab URL for your repository to CourSys (as described in the assignment document.
- [UPDATED] Due Friday, Oct 21st by 11:59pm.
- Submit via CourSys
- See assignment submission directions for how to create/test ZIP file.
Policies
-
Late Policy:
60 minute grace period for due dates; 5% penalty per calendar day; usually max 3 days late. Contact the instructor if there are extenuating circumstances. -
Extensions and Deferrals:
Email Dr. Brian with your request. You may need to complete and email SFU Academic Concession Self-Declaration Form. Doctor's notes are usually not required. Extensions only considered for circumstances beyond the student's control; plan to submit assignments on time. -
Academic Honesty:
- The MOSS tool will be used to check the originality of all electronic submissions.
- SFU's Academic Honesty policy is crucial to earning credit in this course. Violations of the policy will be taken seriously and reported to the department and university.
- Explanation of penalties applied for academic dishonesty.