Mihai Balint 2009
Weekly labs held on Friday from 08-10 and 10-12 in room B426. For questions email mihai*cs.upt.ro
Table of contents
1. Intro | 4. UML Sequence Diagrams | 7. Eclipse | Assignment 1 | Assignment 4 |
2. SVN | 5. UML Use-Case Diagrams | 8. JUnit | Assignment 2 | Assignment 5 |
3. UML Class Diagrams | 6. CRC cards | 9. ANT | Assignment 3 | Assignment 6 |
An up-to-date report of student's grades is available.
Important announcements
- Assignment 6 (final) is available.
- Assignment 5 has been published.
- Assignment 4 is available!
- Assignment 3 has been updated!
- Assignment 2 is available online (associated zip)!
- Assignment 1 is available online (associated zip)!
- During each lab take some time to check that your attendance has been recorded.
Usefull stuff
- How to access a SVN server from behind a proxy.
- Please use your SVN repository for assignment development, remember you can find it at http://hoare.cs.upt.ro/mihai/svn/YourName/trunk
Week 12 (22.May). Build systems. Ant.
- Ant tutorials and documentation
Week 11 (15.May) Final Deadline for Assignment 4
- UnitTesting with JUnit
- Assignment 5 (due 22.May) - The following code contains classes used to represent a date from the calendar and a few tests for those classes. Write additional tests as instructed in the comments from the files: TestDateArithmetic.java and TestDateComparison.java.
Week 10 (08.May) Deadline for Assignment 4 (extended 1w).
- Updated requrements: Managers also receive commissions and salaries (either monthly flat salary or hourly rate salary). All submitted sales receipts are added as company income. Employees are paid only if the company has sufficient funds for salaries. Salaries are paid from company funds.
Week 9 (01.May) - International Labor day
Week 8 (17.Apr) - IDEs (Eclipse)
- Eclipse IDE (creating projects, perspectives, views, SVN, refactorings). Example sources.
- Documentation
Assignment 4 - Using your favorite Object-Orinted Language and IDE (with support for refactoring, subversion and which runs on the lab computers), implement a working version of the The Payroll System documented in the previous assignment. Consider this (incomplete) list of use cases as objectives that must be implemented for the interim Milestone (next lab - should have been May 1st). The complete, working system is due before the Deadline (May 08). Since there was no interim milestone, a few bugs will be accepted.
Documentation: CRC Intro
- Missing assignments (A1, A2 and A3)
- Unit Testing. Black-box testing. White/Glass box testing. More info: lecture slides - Software testing, slides 43-57,
- Implementing unit tests using JUnit. JUnit CookBook (updated for JUnit 4). TestInfected - testing practice (code is for JUnit 3). JUnit at SourceForge. JUnit java doc API
Week 6 (03.Apr) - Buffer lab, no new sutff, assignment reviews only
Week 5 (27.Mar) - UML Use-Case Diagrams
- Documentation
- Assignment 3 (due 03.Apr) - Draw a use-case diagram and asociated story cards using the following requirements:
- Are timecards submitted every day, containing the number of work hours? Can there be exceptions to this behavior? (ex: submit only 1 punch card Friday, detailing each week day's worked hours)
- There are different employee actors. For the sake of simplicity, they could all enter a generic punch card, which states their names, date and hours worked, flat salary, or date and amount of sale (each category fills in only the fields relevant to him, either way, fields that do not correspond to his category will be ignored). This way all different employee actors will be substituted with a time card actor. The differentiation between employees is made by querying the employee "database" (a collection of abstract Employee)
- With whom is the commission rate negotiated (person X)? Can the employee suggest rates on his time cards, which stack up and will be revised at a later date by X who could login, revise and maybe update the employee's profile, or does the employee negotiate live with X, without entering his desired rate in the system, and after the "live" negotiation, X logs in and updates that employee's commission rate?
- Also we need the system to generate a report showing the detailed payment data of any employee. Does this refer to a complete history of that employee's payments?
- [NEW] When an employee selects a certain method of payment(i.e. By the hour or Flat salary) should the system verify that he is indeed paid in that particular way(by the hour or flat salary) ??
- [NEW] Should the system contain a database of employees and their respective status of payment or if they are truly managers/accountants and verfiy this fact or are the cards manufactured in such a way that the card reader can discern this fact the moment the employees' card is read ??
Week 4 (20.Mar) - UML Sequence Diagrams
- Documentation
- Assignment 2 (due 27.Mar) - A UML Sequence diagram and and an updated version of the java files from the first assignment are available in this archive. Once again the assignment consists of two parts:
Part 1: A sequence diagram is provided; the implementation of that sequence is required. The modeled system is an upgrade of the one you had to implement for A1 P1. If you still have the source files from A1 P1 you may reuse them. A class diagram (with changes highlighted) is also provided for those that do not have A1 P1 available.

Part 2: A newer version (with bug-fixes) of the code from A1 P2 is provided. You must draw a UML sequence diagram considering the two calls (specs() and prices() marked in the main method) from ComputerStore.java as found messages. Consider starting you sequence like in the figure to the right.
As with all assignment results, you are required to upload them to your subversion repositories. (.uml source file for the diagram, .jpg picture of diagram, source files)
Week 3 (13.Mar) - UML Class Diagrams
- Tutorials and documentation
- UML Tools
- Assignment 1 (due 20.Mar) - A UML class diagram and a few Java source files are provided in this archive. This assignment consists of two parts:
Week 2 (06.Mar) Code versioning systems - Subversion Recommended Subversion documentation/reading:
- Simple SVN windows tutorial - emphasis on Using Subversion. The getting started section covers repository creation and configuration - topics not presented during lab classes (and not required but important if you plan to host your own repositories or understand SVN concepts, function and structure).
- SVN book - suggested reading: first chapters (minimum 1 and 2)
- SVN distributions for various OSes
- Introduction or "Did you know they use Eclipse to design hardware?"