100 likes | 108 Views
Understand and implement project assignment with a focus on software architecture, following Boyle's, Brooks's, and Cheops's Laws while creating LMS class skeletons.
E N D
Today • As3 grading • Clarity, completeness, inconsistencies • Comments • CVS guru name • Project assignment • Architecture • Next: Design, review, code, test, review, integrate, test
Today’s laws • Boyle's Laws: • The deficiency will never show itself during the dry runs. • Clearly stated instructions will consistently produce multiple interpretations. • Brooks's Law: • Adding manpower to a late software project makes it later. • Cheops's Law: • Nothing ever gets built on schedule or within budget.
Architecture • Interfaces and skeletons
LMS Class Skeleton public class Patron{ // Class Semantics and roles // Library Patrons function in two primary // roles, as researchers who use index, // reference and database materials, and as // borrowers of loanable resources. // Information maintenance // Creation: new patrons are introduced // into the system by library staff when // presented with a library membership // application or from information // retrieved from a web-based application
LMS Class Skeleton public class Patron{ // Class Semantics and roles // Library Patrons function in two primary // roles, as researchers who use index, // reference and database materials, and as // borrowers of loanable resources. // Information maintenance // Creation: new patrons are introduced // into the system by library staff when // presented with a library membership // application or from information // retrieved from a web-based application
More LMS Class Skeleton // Information maintenance continued // Deletion: patrons are removed from the // library database 3 years after their // membership expires // // Instance variables private String name; // Patron name in // last, first, middle initial format private long PatronID; // Patron library ID // number. Automatically generated . . .( See deliverable 5.1 for other instance variables )
More LMS Class Skeleton // Class variablesprivate static long nextPatronID; // Keeps // track of next patronID to be assigned // Constructors public Patron(String n, long home, Date m, Date e, String street, String city, String state, long zip) { // Parameters: n = name, home = homephone // PatronID = getnextPatronID() // street,city, state, and zip are used // to create an address object for // homeAddress
More LMS Class Skeleton // Constructors continued// Precondition: for constructor: // Library database can accept an // additional entry and memory allocation // succeeds // Postcondition: Library database will // contain an additional Patron and Address // entry } // Static methods public static long getnextPatronID() { return nextPatronID; nextPatronID++;}
More LMS Class Skeleton // Non-static methodspublic boolean validatePatron(Date e) { // ensure membership is not expired // Precondition: expireDate != null // if expireDate <= Today return false // else return true} . . .( See deliverable 5.1 for other non-static methods )} // end class Patron