The University of Aberdeen
The Computing Science Department

Practicals

You can now register for practical and tutorial sessions through http://www.abdn.ac.uk/mycourses.

Quick Links

Arrangements Weekly Practicals Solutions Problem Bank

Practical Arrangements

The allocations to groups and practicals will be available here. If you do not appear on this list, it is because you have not registered on-line. Please do so following the link http://www.abdn.ac.uk/mycourses.

You are required to attend one 2-hour practical session per week. Practicals are held in teaching weeks 2-12 inclusive. A register will be taken.

You should sit with your group - your demonstrator will show you where.

DayTimePlaceGroupsDemonstrator
P1 Monday 11:00-13:00 Cruickshank 218 A, C, D, G, I, K Dr. Murat Sensoy
P2 Monday 15:00-17:00 Cruickshank 218 D, E, F, G, H, I, K, L Dr. Murat Sensoy, Dr. Wei Pang
P3 Friday 12:00-14:00 Edward Wright F84 A, B, F, H, M Dr. Wei Pang, Dr. Alan Eckhardt

Work to be completed in the practicals will be set during the preceding week, and will be listed on this web page. Your demonstrator will ask to see this work during the practical.

You should attend one 1-hour group mentoring session per week during teaching weeks 2-12 inclusive. A register will be taken.

GroupsDayTimePlace
M1 A, B Monday15:00-16:00 Taylor C17
M2 C, D, E, F Tuesday13:00-14:00 Meston 013
M3 G, H Tuesday13:00-14:00 Meston 159
M4 I, K, L, M Wednesday13:00-14:00 Meston 159

Weekly Practicals

Week 1: You have no practical this week. Spend your time experimenting with the UserDialog class as discussed in our lectures so that you are familiar with what you can do with it.

Week 2: JavAir

Week 3: You should have completed the JavAir problem by the time of your practical. Show your solution to your demonstrator. The problem for week 3 is PhoneBook

Week 4: You should have completed the PhoneBook problem by the time of your practical. Show your solution to your demonstrator. The problem for week 4 is StockControl

Week 5: You should have completed the StockControl problem by the time of your practical. Show your solution to your demonstrator. The problem for week 5 is JavAirPlus

Weeks 6-8: The problem for weeks 6 to 8 (i.e. to the start of the Spring break) is SuperSim. You should work on this in the groups to which you have been allocated. See the handout for the rules which apply to the operation of groups. The deadline for submission is 12 noon Friday 23 March.

Week 9: The problem for week 9 (Student Registration) is intended to give you experience with inheritance. At the time of their practical, CS1515 students won't have covered all they need to do to tackle this, but look at the Questionnaire example discussed in our lectures and a solution, to give you some inspiration.

Weeks 10-12: The problem for weeks 10 to 12 (i.e. to the end of teaching) is Road Pricing. You must work on this on your own. The deadline for submission is 12 noon on Friday 11th May.

Solutions

Solutions will be made available in the week following the practical.

Week 2: JavAir

Week 3: PhoneBook

Week 4: StockControl

Week 5: JavAirPlus

Weeks 6-8: SuperSim

Week 9: Student Registration

Weeks 10-12: RoadPricing

Problem Bank

There is a 'bank' of practical problems for you to work on. For each problem, there is a discussion on the sort of Java knowledge required to solve it and an indication of the number of lines of code in a reference solution.

For some of the problems, some help is available in the form of pseudocode or a 'skeleton'. A skeleton is a precise description of what needs to be done to solve the problem, often with some code already provided. Do not go straight to this. Part of what you need to learn is how to go from the informal specification in the problem to the kind of detail provided in the skeleton. At some point there will be code provided as a solution to the problem, but in a sense you shouldn't need this. Writing your own code and discussing it with your demonstrator is the best 'solution'. Some of the problems will be discussed in lectures. This should not stop you completing them yourself.

Problem Content Help Notes
Simple Counter One class; conditionsl (if) Solution N/A
Stadium One class; conditions (if), loop (while) Slides Solution Revision slides
JavAir One class; conditions (if), loop (while) Solution Week 2 Practical
Parcel Tracking Two classes plus test class; collection (ArrayList); conditionals (if), iteration (while, for) Solution N/A
Phone Book Two classes; collection (ArrayList); conditionals (if), iteration (while, for) Solution Week 3 Practical
Train Timetable Two classes; collection (ArrayList); conditionals(if); iteration (while, nested for) Solution Slides
Stock Control Three classes, two array lists; Solution Week 4 Practical
Car Park Two classes, simulation with random numbers Solution Slides
Packet Switch Two classes, simulation with random numbers Solution Slides
Java Air Plus Three classes, simulation with random numbers Solution Week 5 Practical
Channel Simulation Demo of more complex simulation Solution Slides
Foxes and Rabbits Simulation demo from Barnes and Kölling Demo N/A
The Office Three classes; collections (ArrayList or HashSet); conditionals and iteration Skeleton (PDF) Skeleton (ZIP) N/A
Multi-Choice One class; text file reading; arrays answers.txt Solution N/A
Win A Lot One class; text file reading; arrays tickets.txt Solution N/A
Registration Five classes, inheritance, text file writing, ArrayList Solution Week 9 Practical
Questionnaire Four classes, inheritance, text file writing, ArrayList Solution N/A