programming project on AOP

advertisement
CS3360: Design and Implementation of Programming Languages
Programming project #2
Due: March 8th at 5pm via email to both TAs
Notes: 1) This project is to be done individually.
2) You will receive credit for this assignment only if you turn it in on time and you arrange to meet with
the TAs (Aditi Barua, abarua@miners.utep.edu, and Angel Garcia, afgarciacontreras@miners.utep.edu)
within a week after the deadline of the project so that they can assess your work with you.
Goal of the project: Understand the power of Aspect Oriented Programming and use the syntax of
Aspect J; be able to put Aspect J to practice and reflect on its use.
To be done: Following your first project about an inventory system, you now have to implement, using
Java and Aspect J, the following functionalities (aspects, services):
1) A log-in function, using Java (and generate a list of a few users)
2) Control the log-in as follows:


Keep track of the log-in history of every user; store this history in memory in a way that is easy
to use later on (for instance to access the log-in pattern of each user, to look at the log-in times
of everybody, etc.)
Printing a message saying “Your account is going to be audited!” to the nth user that logs in and
store the user’s name in an audit file (n is a number to be determined by the administrator of
the inventory for instance)
3) Keep track of the changes in the inventory:


By preventing anybody else than the “boss” to add/remove categories
By keeping track, for each category, of the number of times items are added to / removed from
the inventory
For each of the above tasks 2 and 3, you will design aspects as needed. You will then describe your
choices and their effectiveness in:
4) A supporting document, in which you will:


Describe what you program does and how to use it;
List and describe the changes you made from the original OOP inventory, including a
justification for the implementation choice of the aspects.
Download