Mid Term 1 Review
REFRESH THIS PAGE
I will be adding updates to this page in the first few
weeks of the course.
Topics Covered:
Exam Policies and Rules
Make sure you've read over and understand the
Assignment and Exam Policies for
this course.
- The exam is part closed-book quiz and part practical.
You will need your computer with all
the required software and the
ability to connect to the internet and SLATE, and the
ability to run Respondus. It is your responsibility
to make sure you have these things before the exam begins.
Accommodation will not be made at the last minute.
- The first 30 minutes will be for completing the closed-book
portion of the exam. This portion will be short-answer
knowledge/understanding questions e.g. multiple-choice and
short-answer, along with at least one explain/describe
question.
- The practical portion is 2 hours and is
"open book" - you may use your notes, sample
programs you've written, my web notes, any resources I've linked to,
and other course resources. You may not copy code from the
Internet that isn't yours. You will be creating a small application
using the skills and knowledge you've gained from doing the
practice exercises and graded exercises.
- No other paper, notes, or books (except those mentioned
above), nor any calculators or other devices
are allowed on the desk during the exam (this includes phones).
- All phones/devices must be turned off during the exam
(not just silenced or on vibrate: they must be OFF).
You may not answer your phone or use any electronic
device during the exam except your computer.
- You are not permitted to discuss the exam with anyone else
while you are writing it. You are not permitted to ask
another person for help/advice/etc.
- You are not permitted to communicate with any other
person during this exam except your professor during
this exam. This includes but is not limited to chat
communication, voice communication, and forum or
discussion board postings.
- You may not share/post or otherwise make public or give
to anyone else your exam answers during or
after the exam. This would constitute
a breach of academic integrity on your permanent
record and will be dealt with accordingly.
- If you are late for the exam, you will not be given
extra time. If you miss the entry window to the
closed-book portion, you will not be permitted to
complete the closed-book portion of the exam.
(NOTE that in this case, you must notify me so that I can open the practical
portion of the exam.)
- There are no make-up exams.
- Failure to follow any instructions given by your professor
will result in a grade of 0 on the entire exam.
Important!
If you lose your internet connection
you must notify me IMMEDIATELY (e.g. using your
phone's carrier network if you're doing a virtual
exam).
Plan ahead!! Make sure you don't sleep in, as that is not a valid reason for missing
a test. For in-person exams, make sure you leave
for school earlier than normal in case you encounter
transportation problems on the way (i.e traffic jam, broken-down bus, etc).
If you drive, make sure you have a bus schedule - if your car won't work when
you leave for school, you'll have the time and resources to take the bus, instead.
Important!
The closed-book portion uses Respondus.
It is recommended that you
perform a test of the Respondus software before the
exam in case there are any updates to install.
It is your responsibility to ensure that Respondus works
on your machine prior to the exam.
Summary of Topics
Review
- JavaBeans/POJO - industry standard design - constructors,
accessors/mutators, toString(), data members, exceptions, etc.
- HTML Forms - creating HTML forms
- CSS - esp. basic styling (including tables, lists),
HTML form styling
Java Web Applications
- Terminology: dependency, dependency injection, artifact,
inversion of control, spring / spring boot, etc.
- MVC design pattern
- Dependency injection and how it works, Inversion of Control
and the IoC container, etc.
- Technologies used so far: Maven, Spring and Spring Boot,
Lombok, Thymeleaf, JDBC, In-Memory database, H2.
- Creating the controller class,
mapping URLs, request parameters, etc.
- Form binding, model attributes, parameters, etc.
Lombok
- What is it, how does it work
- The different annotations and what they do,
how to customize them (or where to find out how
to customize them)
Thymeleaf
- Syntax, how it works
- Thymeleaf attributes, selections, iteration,
utility objects and their methods.
Database
- In-memory database vs. persistent database,
using the h2-console
- Database Configuration class vs. Database Access
class; database configuration properties
- Creating a data-driving spring app: h2, schema.sql, data.sql,
etc.
- JDBC templates / thymeleaf
- Performing basic CRUD operations
Sample Questions
Make sure you've done all of the practice exercises in each lesson.
You can also practice by creating applications that follow
the basic pattern we've learned so far:
- Choose some kind of data to manage: your
sock inventory, your favourite movies,
your kids' old toys, your contact list,
your household expenses, a collection of
some sort, a shopping list, etc.
- Create a database table to manage your
collection, and at least one look-up (e.g.
think Players -> Teams or Books -> Genre)
- Create a bean that models one item in your
collection. Tip: make sure the data member
names and table column names match!
- Create an input form so a user can enter
an item in your collection. Make sure
there's a field that looks up values
from the look-up table (e.g. think the Teams
drop-down list, or you can do a set of
radio buttons or a regular list box)
- Upon form submit, gather the input data and
construct an instance of your bean.
Add that bean as a record to the database.
- Retrieve an updated list of the items in the
database.
- Output the list of items to a Thymeleaf
template page.
Do a few of those kinds of applications so that you
become familiar with the process, the pattern of
tasks you're doing. If you can do one of those
without looking up too many things, you'll be
fine.
Challenge yourself and be curious:
try things you haven't done
before. For example, display the collection of
items on the same page as the input page, or
add some extra functionality like a search for
specific items. Try different things you can
do with the Thymeleaf utility objects or by
customizing Lombok annotations.