COMP 303 Lecture Notes - Lecture 4: 5Th Millennium Bc, Information Hiding, Linked List
Document Summary
Protecting class variables from improper states, values, & use. Value each variable has a legal range of values speci ed by the problem. State all the variables in the class represent the state of the object. Each object has a legal set of states as speci ed by problem. Use the class has a nite set of legal operations. We can have if statements to check the values coming in. In all the operations, we can check the state before performing the operation. Use optimal data structures and algorithms e. g. push and pop has to check isfull() and isempty. Q: what data structures and algorithms are most optimal for the queue of university students? (enumerate options) System. out. println( today. tostring( ) ); // mon sept 21 9:30:00 est 2015 long n = today. gettime(); //java records time as number of milliseconds from 1970 (arbitrary zero point known as epoch) Milliseconds are integers, and therefore they are ordered.