Cs-255 4-2 Evaluate a Process Model

docx

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

CS-255

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

5

Uploaded by Barbarajean88

Report
4-2 EVALUATE AN OBJECT MODEL Barbara McKenney CS-255 SYSTEM ANALYSIS AND DESIGN Southern New Hampshire University
1. Interpret the object model for the new online storefront by responding to the following prompts: o What are the different functions of the online storefront? How are they represented in this type of model? The Hamp Crafts online storefront object model has 12 functions: "register(), login(), updateProfile(), verifyLogin(), updateCatalog(), addCartItem(), updateQuantity(), viewCartDetails(), checkOut(), updateShippingInfo(), placeOrder(), and calcPrice()." Each function belongs to a specific class. The first class is the Customer class, which includes the following functions: "register(), login(), and updateProfile()." The second class contains the "verifyLogin()" function and is part of the User class. The Administrator class is the third class and it holds the "updateCatalog()" function. The fourth class is the Shopping Cart class and it holds the functions "addCartItem(), updateQuantity(), viewCartDetails(), checkOut(). The fifth class contains the "updateShippingInfo()" function and is part of the Shipping Info class. The sixth class is the Order class and it includes the "placeOrder()" function. Lastly, the seventh class contains the "calcPrice()" function which is contained within the Order Details class. A list of each class's functions can be found in the operations section. The function names are preceded by a plus sign (+). This signifies that all 12 functions are public and accessible from anywhere. o What are the different classes of “users” represented by this object model? What are the associations between these classes? The different classes of “users” represented by this object model are the Customer and Administrator classes. These two classes are associated with each other through inheritance, represented by a hollowed arrowhead on one side. In both the Customer and Administrator classes, the hollowed arrowhead
points to the User class. In other words, both classes inherit attributes and functions from the User class. It enables developers to avoid redundant code throughout their projects by representing this relationship in the object model and code. o How would the objects “use” their respective variables and functions? Objects typically capture and store data, which can be used by functions that need it. According to Hamp Craft's object model, an Administrator object would input its password and user ID. To login to the system these credentials would be stored in the userID and password variables. If the login credentials are correct, verifyLogin() will return true, otherwise, it will return false. The variable login status is updated regardless of whether the function outputs true or false. In the variable registerDate, the date when the administrator registered is stored. When the updateCatalog function is called, adminName and email are used to store the administrator's name and email address. As illustrated above, the Administrator object maintains state and performs administrator operations by utilizing specific variables and functions. There would be similarities between objects of other classes, but they would have their own variables and functions. o Does this object model capture all of Hamp Crafts’ desired functionality? Why or why not? It is my belief that the object model encompasses most of the desired functionality for Hamp Crafts' online storefront. There are a few things I would like to see added. For example, I see no association between the Administrator and Order Classes, which would be a helpful add-on to allow Hamp Crafts to receive transaction alerts. Also, Hamp Craft's object model does not allow them to accept payments from customers through established credit card vendors. Furthermore, the Administrator class does hold an updateCatalog()
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
function it does not show whether or not there is an administrative backend for updating both the business owners' websites and customer information. o The above diagram uses a solid diamond shape to represent a form of aggregation. What type of aggregation does this represent? What does it imply about the relationship between the classes? Why is a solid diamond the appropriate choice here? In aggregation, the filled-in diamond shape represents composition, indicating a strong relationship where the "part" class is entirely dependent on the "whole" class. In other words, the "part-of" class cannot exist without the others. Aggregation is an excellent choice in Hamp Crafts' object model. For example, we can see that neither the shopping cart nor the order objects can occur without customer objects. Furthermore, shipping info and order detail objects cannot exist without an order object. Each form of aggregation includes numbers in each class and represents the number of objects between the two classes. For example, looking at the provided UML we can see that the ‘Shopping Cart’ class is connected to the ‘Customer’ class with a line ending with a filled-in (solid) diamond shape, indicating aggregation (composition). The ‘Shopping Cart’ class and the ‘Customer’ Class with a cardinality of 0..* on the side of the ‘Shopping Cart’ and the number “1” on the side of the ‘Customer’. This is an indication that each ‘Shopping Cart’ can be associated with zero or more customers, however, each shopping cart must be associated with exactly one customer. 2. Finally, think through the two different models you’ve explored for Hamp Crafts’ systems: a process model and an object model. Then compare these models by responding to the following prompts:
o How well do you think a process model describes the system? What information does it make easier to understand? What aspects of the system are more difficult to understand or are not represented? If you want to represent what a system should do in an easy-to-understand manner, then a process model is the way to go. It is a way of visually illustrating how a system should function. A process model is an excellent starting place when creating a system. Additionally, process models are effective for illustrating to the client(s) the flow of the system and how it will work. However, it is important to keep in mind that a process model doesn't represent how each aspect of the system works in harmony nor does it show how it was developed. o How well do you think an object model describes the system? What information does it make easier to understand? What aspects of the system are more difficult to understand or are not represented? In comparison to a process model, an object model is much more detailed. In my opinion, object models help developers understand two important things how the whole system will work together and how it will meet the client's needs. Classes, variables, functions, and associations between classes are all part of an object model. It can be difficult to understand the details in an object model at first glance because there is so much information included. Nevertheless, it provides thorough details concerning the way the system should be developed and work together.