|
EECE 3220 Computer Software Engineering
|
|
|
Assignment Format Instructions Assignment 1: Chapter 1 textbook problems: 1, 2, 4, 5, 6, 7, 8, 9, 10. Assignment 2: Part A. All Chapter 2 textbook problems. Note: problems 2-6 through 2-9 can be integrated into one problem, that is, provide one class diagram and one object diagram that satisfies the requirements of 2-6 through 2-9. Part B. Discrete Math Review. Assignment 3: Problems. Note that object model refers to a class diagram. The term instance diagram and object diagram refer to the same thing. Assignment 4: 1. Develop an Object Model (class diagram) for the following: An experimental forest, which is identified by its name, has many trees of various species. Data about the forest's size, owning company, and location is to be maintained by the database. A forest is maintained by foresters, who are uniquely identified by their SSN. A forester only maintains one forest. Also, the foresters' name, age, and address is to be captured. The experimental forest contains data about each species. A species is uniquely identified by its name. In addition, the woodtype and maximum height for the species is maintained. Trees in the forest are identified by their tree number. Also, the tree's location and date planted is maintained. The tree's species is also captured. The trees in the experimental forest will be measured several times during the tree's life span, and each measurement will have a unique number. The measurement result, type, and date is also maintained. Trees can propagate more trees, and the same data must be captured for the child trees. 2. Develop an Object Model for the following (hint the CLASSES appear in caps). Also, show all candidate keys and any partial keys and eliminate any multi-valued attributes in your model. A company database keeps track of a company's EMPLOYEES, DEPARTMENTS, PROJECTS, and the DEPENDENTS of employees. Each department has a unique name, a unique number, and a particular employee who manages the department. We keep track of the start date when the employee began managing the department. A department may have several locations. A department controls a number of projects, each of which has a unique name, and a single location. We store store each employee's name, social security number, address, salary, sex, and birth date. An employee is assigned to one department but may work on several projects, which are not necessarily controlled by the same department. We keep track of the number of hours per week that an employee works on each project. We also keep track of the direct supervisor of the employee. We want to keep track of the dependents of each employee. We keep each dependent's name, sex, birthdate, and relationship to the employee. Model DEPENDENT as a class that has ID dependency on EMPLOYEE. Assignment 5: Chapter 4 textbook problems: 1, 2, 5, 6, 9, 10. Assignment 6: Chapter 5 textbook problems: 1, 2, 3, 4, 6, 8. Assignment 8: 1. For figure 5.6 in the funtional modeling handout write an ONN expression that finds the grantor for aTable and grantee aUser. 2. For figure 2.23 provided in class, write an ONN expression that finds the seatType for a seat. 3. The following exercises are based on figure 2.23 provided in class and the revisions shown in figure 5.10 in the functional modeling handout. Write methods using pseudocode enhanced with the ONN to specify the following queries. Clearly state any assumptions you make. 3a. find the airlines that serve an airport. 3b. determine how many pieces of baggage are supposed to be on a flight. Assume the function cardinality is available that takes as an argument a set and returns the number of elements in the set. 3c. find the seat number(s) assigned to a passenger on a flight. A passenger normally is assigned at most one seat, but on occasion my reserve multiple seats for a flight. Assume the function setIntersect is available that takes as arguments two sets and returns a set containing the intersection of the members in the two sets. 3d. compute the number of pasengers that are served by an airport on a given data. You can ignore the complexities of a long distance travel, in which a flight may begin on one day and end on the next day. (Hint: if a person flies through an airport several times in the same day, you can count the person only once). Assignment 9: 1. Using pseudocode and ONN, write the following methods for the directed graph model: a) Find all edges leaving a node. b) Find all edges with the same node as source and sink, that is, the direct cycles in the graph. c) Find all nodes that are reachable from a source node, that is, the transitive closure. Assignment 10: Write ONN expressions or methods with pseudocode for the following queries, which refer to the abridged OMT metamodel provided in class (with title Figure 4.6 An abridged OMT object metamodel). a) Find all the direct superclasses for a subclass b) Find all the direct subclasses for a superclass c) Find all the components for an assembly d) Find all the assemblies that include a component e) Find all the attributes that describe the objects of a class (you must consider the attributes of the class and all inherited attributes too, that is, you need to traverse up the inheritance lattice) Assignment 11: Chapter 6 textbook problems: 6-1, 6-2, 6-5, 6-6, 6-7. Assignment 12: Chapter 7 textbook problems: 7-1, 7-2, 7-3, 7-4, 7-5. Assignment 13: 1. Convert the airline flight reservation class diagram to the relational data model. Indicate all primary and foreign keys. Indicate if the foreign keys permit NULL values. 2. What is the logical horizon of City in the airline flight reservation class diagram? 3. What is the logical horizon of OtherActivity in Figure 3.36 (this figure is in the handout that shows the packages for the airline flight reservation system). Note that you should consider the other packages in determining the the logical horizon for OtherActivity. 4. Convert the class diagram for the relational database meta model to the relational data model. Indicate all primary and foreign keys. Indicate if the foreign keys permit NULL values. 5. a) Briefly, discuss when files would be more appropriate than a database management system for persistent data management. b) Briefly, what are some of the tradeoffs between choosing a relational or an object-oriented database management system for managing persistent data?
|