Noun-Verb Decomposition Nouns Verbs Restaurant [Regular, Catering, Take- has (information) Out] (Location, Type of food, Hours of operation, Reservations) Reservation Information Location Hours of operation Things SWEN-261 Account Introduction to Software User [Diners, Logged-in, Guest, make (reservation) Restaurant] (Name, Rewards points, complete (reservation) Password, Google login, Reservations) saves (reservation) Engineering modifies/deletes/views (reservation) authenticate with (??) Department of Software Engineering Rochester Institute of Technology
Using nouns and verbs provides a perspective for an initial class decomposition. Nouns may represent • Classes • Specializations, i.e. subclasses • Attributes of classes • Data elements Verbs may represent • Services a client needs • Services a server provides
An analysis beyond a simple list of the nouns and verbs provides additional guidance. Using structure and annotating the nouns and verbs list moves you toward a class decomposition. This helps yield a class structure that is isomorphic to the world view of the problem similar to your domain modeling. It also helps identify the location for responsibilities.
Restaurant Reservation System (RRS) Each restaurant has information about its location, type of food, hours of operation, and reservations. The restaurants are broken up into regular, catering, and take-out where making a reservation means a different thing for each category of restaurant. Diners will be able to use the system either when logged into their account or as a guest. Diners, either as guests or logged in users, can make reservations. Reservations will be saved to a user's account if they are logged in. Logged in users can also modify or delete reservations in their account. A user's account will store a name, rewards points, and their upcoming and past reservations. Restaurant users will have an account which can view, modify, or delete any reservation made for their restaurant. The restaurant user can also complete a reservation when diners arrive. All users will authenticate using a password or Google login.
Step 1 is to identify the nouns in the problem statement, domain, and user stories. Make a list of all the nouns in the left column of a two column table. • Put each noun in a table row. • You only need to list a noun once.
RRS – Identify the nouns Each restaurant has information about its location, type of food, hours of operation, and reservations. The restaurants are broken up into regular, catering, and take-out where making a reservation means a different thing for each category of restaurant. Diners will be able to use the system either when logged into their account or as a guest. Diners, either as guests or logged in users, can make reservations. Reservations will be saved to a user's account if they are logged in. Logged in users can also modify or delete reservations in their account. A user's account will store a name, rewards points, and their upcoming and past reservations. Restaurant users will have an account which can view, modify, or delete any reservation made for their restaurant. The restaurant user can also complete a reservation when diners arrive. All users will authenticate using a password or Google login.
RRS – Identify the nouns Nouns Verbs Restaurant Reservation Information Location Type of food Hours of operation Things Category of restaurant Diners Account Guest User Name Rewards points Password Google login
Step 2 is to determine any specializations of the nouns that might exist. Identify any words that might be specializations of other nouns. • Put the specializing word in brackets [] next to the noun it is specializing • If the word is a noun and has no other use than this specialization remove its row in the table
RRS – Identify specializations Each restaurant has information about its location, type of food, hours of operation, and reservations. The restaurants are broken up into regular, catering, and take-out where making a reservation means a different thing for each category of restaurant. Diners will be able to use the system either when logged into their account or as a guest. Diners, either as guests or logged in users, can make reservations. Reservations will be saved to a user's account if they are logged in. Logged in users can also modify or delete reservations in their account. A user's account will store a name, rewards points, and their upcoming and past reservations. Restaurant users will have an account which can view, modify, or delete any reservation made for their restaurant. The restaurant user can also complete a reservation when diners arrive. All users will authenticate using a password or Google login.
RRS – Identify specializations Nouns Verbs Restaurant [Regular, Catering, Take-Out] Reservation Information Location Type of food Hours of operation Things Category of restaurant Diners Account Guest User [Diners, Logged-in, Guest, Restaurant] Name Rewards points Password Google login
Step 3 identifies which nouns might be associated with other nouns. Identify any associated nouns that might be • Attributes of other nouns • Properties of other nouns • Information/data owned by other nouns Connect the nouns together • Put the associated noun in parentheses () next to the noun it is associated with • Remove the associated noun's row only if it is a primitive data type. Err in the direction of keeping nouns in the list.
RRS – Identify associated nouns Nouns Verbs Restaurant [Regular, Catering, Take-Out] (Location, Type of food, Hours of operation, Reservations) Reservation Information Location Type of food Hours of operation Things Account User [Diners, Logged-in, Guest, Restaurant] (Name, Rewards points, Password, Google login, Reservations) Name Rewards points Password Google login
Step 4 expresses the use of each verb in a subject-noun verb object-noun form. Identify all of the verbs For each verb, express its use in a phrase of the form • subject-noun verb object-noun subject-noun invokes the action object-noun has the action done on it • Use the active voice for the verb • If it is in the passive voice, rephrase it
RRS – Identify the verbs Each restaurant has information about its location, type of food, hours of operation, and reservations. The restaurants are broken up into regular, catering, and take-out where making a reservation means a different thing for each category of restaurant. Diners will be able to use the system either when logged into their account or as a guest. Diners, either as guests or logged in users, can make reservations. Reservations will be saved to a user's account if they are logged in. Logged in users can also view, modify, or delete reservations in their account. A user's account will store a name, rewards points, and their upcoming and past reservations. Restaurant users will have an account which can view, modify, or delete any reservation made for their restaurant. The restaurant user can also complete a reservation when diners arrive. All users will authenticate using a password or Google login.
RRS – Express verbs in subject verb object form Restaurant has information Diners are able to use system Diners (users) make reservations Reservations will be saved (by the user? system?) User saves reservations to account User modifies/deletes/views reservations Restaurant user completes reservation Users authenticate with password or Google account (object-noun ??)
Step 5 connects each verb to the nouns in the phrase expressing the verb's use. Connect each verb to the subject-noun • Put the verb in the right column of the table row of the subject-noun Connect each verb to the object-noun • Put the object-noun in parentheses () to the right of the verb
RRS – Connect verbs to nouns Nouns Verbs Restaurant [Regular, Catering, Take-Out] has (information) (Location, Type of food, Hours of operation, Reservations) Reservation Information Location Hours of operation Things Account User [Diners, Logged-in, Guest, make (reservation) Restaurant] (Name, Rewards points, complete (reservation) Password, Google login, Reservations) saves (reservation) modifies/deletes/views (reservation) authenticate with (??)
Step 6 does grooming of the noun-verb table If a noun has no attributes or specializations, and does not invoke any verbs, consider eliminating it from the table. • Is there a verb missing that this noun invokes, or expresses an action performed on this noun? • Is this noun really outside the system boundary? If a verb is not invoked by anything, consider eliminating it from the table. • Is there a noun missing that invokes the verb? • Is there a noun missing that has this action performed on it? Are some nouns synonyms? Do some verbs have little relevance?
RRS – Groom the noun-verb table Nouns Verbs Restaurant [Regular, Catering, Take-Out] has (information) (Location, Type of food, Hours of operation, Reservations) Reservation Information Location Hours of operation Things Account User [Diners, Logged-in, Guest, make (reservation) Restaurant] (Name, Rewards points, complete (reservation) Password, Google login, Reservations) saves (reservation) modifies/deletes/views (reservation) authenticate with (??)
Recommend
More recommend