83.4k views
0 votes
1- choose 6 class names (same name,new name,...)

2- write/draw around 40/50 methods under 6 classes
3- Idea is to group them so that cohesion and coupling rules is followed.
(related functions to be in one class)
text chapter 7 describes cohesion and coupling.

User Howard
by
7.7k points

1 Answer

0 votes

Final answer:

The question involves software engineering principles related to class design, cohesion and coupling, where classes are designed to be cohesive with methods that are logically grouped, and coupling is minimized.

Step-by-step explanation:

The question is focused on software engineering principles, specifically class design, cohesion and coupling, and the methods pertaining to those classes. In object-oriented programming, it is important to design classes that are cohesive, meaning all the methods and variables in a class are closely related to each other. Moreover, coupling relates to how interconnected different classes are, with a preference towards low coupling to ensure changes in one class do not greatly affect others.

Example Classes and Methods

  1. UserManagement: addUser, deleteUser, updateUser, listUsers, findUserByEmail etc.
  2. InventoryControl: addItem, removeItem, updateQuantity, searchItem, generateReport etc.
  3. OrderProcessing: createOrder, cancelOrder, processPayment, updateOrderStatus, getOrderDetails etc.
  4. Authentification: login, logout, verifyCredentials, changePassword, sendVerification etc.
  5. StatisticReporting: generateSalesReport, generateUsageStatistics, calculateGrowth, getActiveUserCount etc.
  6. CommunicationTool: sendMessage, receiveMessage, createGroupChat, deleteConversation, archiveMessage etc.

Following the rules of cohesion and coupling, these classes group related functions to ensure that they are logically organized and minimize dependencies between the different classes.

User Tbo
by
7.3k points