Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.



These days, online shopping is very popular. Different online shopping sites offer variety of products to its customers. A customer can visit the website and purchase the desired items. Store management expands its product line time to time by adding new items. A product item in the system may go through any of five states during its life cycle. 


Store management adds new items in the system which becomes available for purchase to the customers. They can also remove or disable any item which becomes unavailable to the customers. Customers can select an item to their cart and they can also remove it from the cart to be available for purchase again. Item is purchased after confirmation of the order from the customer and it will be queued for shipment. A product item might become unavailable if it runs out of stock after a purchase. A queued item can also be cancelled by the customer before it is dispatched, which will become available for purchase again. Purchased item will be dispatched to the customer after confirming the status of the product item.





Question No. 1:                                                                                                                                   (10)

Carefully read the above mentioned scenario and identify the five possible states of product item life cycle. Also draw the State Transition Diagram for the mentioned scenario with proper labelling of the transitions.


Question No. 2:                                                                                                                                   (10)

 Suppose you are hired as a software engineer in an XYZ organization for maintaining design of an existing educational institute system. For this purpose, you will need to apply the software design principles for a good maintainable design. All the changes in the system design should be localized, so that, it should have a minimal effect on other parts of the system. A small portion of code from the existing system is given below. This code is observed to be loosely cohesive. You are required to apply the software design principles and make the code highly cohesive.


class course {

         string course_code;
         string course_name;
         int credit_hours;
         int enrolled_student;
         int student_id;
         string student_name;
         int studentCurrentSemster;
         float student_gpa;

      void setCourseCode(string);
      void setCourseName(string);
      void setCreditHours(int);
      void countEnrolledStudent();
      void setStudentId(int);
      string getCourseCode();
      string getCourseName();
      int getCreditHours();
      int getStudentId();
      int getStudentCurrentSemster();

Views: 309

Reply to This

Replies to This Discussion

Study Group Mien discussion Post Kary.....!

Solution pleas sir share krden 28 Nov is 



© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service