PROG12583 FinalReview
PROG12583 FinalReview
Final Review
Topics
Java 1
• Short Answer Questions
• Coding Questions
• Quiz 5
2
Summary of Topics
Java 1
• Python Sequences and collections.
Lists. Accessing list elements. List methods and list slicing.
Tuples, dictionaries and sets
Defining different types of collections and accessing their data.
Common methods and functions used with different collections.
Using loops with collections
3
Summary of Topics (continue)
Java 1
Differences between void functions and value-returning functions.
Passing and returning mutable and immutable objects between functions.
4
Summary of Topics (continue)
Java 1
• Errors and exceptions
Types of errors in programming
What are exceptions, when do they occur and how are they handled?
Different types of built-in exceptions in Python
Handling multiple exceptions
Raising exceptions. Using exceptions for data validations.
5
Summary of Topics (continue)
Java 1
Class UML diagrams. What do they contain?
What are __init__ and __str__ methods? What are they used for?
What are class instances? Creating class instances.
Encapsulation and attribute hiding.
How to access hidden class attributes? What are accessors and mutators?
Raising exceptions inside mutators and constructors.
Class attributes and class methods..
Object and class relationships.
Writing programs using object-oriented design.
6
Conventions
Java 1
Camel case or underscore separated
Constants
Must be created when literals are part of the logic
UPPER case
Underscore separated
Indentation
Code must be properly indented
In Python improper indentations cause errors
In quizzes and midterm use the space bar to indent your code
7
Study Hints:
Java 1
• Use the book's index to look up things you aren't sure about.
• Read SLATE postings for each lesson.
They often contain extra information or rephrase and emphasize the most
important information from the text.
8
Exam Policies and Rules
Java 1
• DO NOT forget your student ID
• All cellphones must be turned off or silenced and kept away.
You are not allowed to answer your phone or use any electronic devices including
calculators during the exam.
• You may not leave the room for any reason during exam.
9
Exam Policies and Rules
Java 1
fill-in-the-blank
write one or two code statements to do something
locate, identify and fix coding errors
show the output of a code segment
• Coding Questions
Two or three questions that ask you to hand-write code to perform a task.
10
Online Exam Policies and Rules
Java 1
• Plan ahead!
Leave earlier than the usual days.
11
Exam Format
Java 1
Fill-in-the-blank
Write one or two statements to perform a task
Identify and fix coding errors
Show the output of a code segment
12
Review
Java 1
• Slate
Lessons 7.1 – 13.2
• In-class Exercises
• Assignments
13
•
Exercises
See Exercises on Slate.
Java 1
Next Class
Java 1
Missing this exam means that you will miss 30% from your final mark
16