0% found this document useful (0 votes)
184 views

Programming Lab 1-2: CS304 - Object Oriented Programming

This document summarizes the key objects, attributes, and behaviors identified in a bookshop scenario. It identifies objects like BookShop, Handouts, Video Lecture, Professor, Student, Course, and Course Content. For each object, it lists example attributes and behaviors. For example, a BookShop has attributes like Name and Address and behaviors like Set Order and Receive Payment. The document also provides examples of applying generalization to File classes like PDF and Video.

Uploaded by

Best Latest
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
184 views

Programming Lab 1-2: CS304 - Object Oriented Programming

This document summarizes the key objects, attributes, and behaviors identified in a bookshop scenario. It identifies objects like BookShop, Handouts, Video Lecture, Professor, Student, Course, and Course Content. For each object, it lists example attributes and behaviors. For example, a BookShop has attributes like Name and Address and behaviors like Set Order and Receive Payment. The document also provides examples of applying generalization to File classes like PDF and Video.

Uploaded by

Best Latest
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Programming Lab 1-2

CS304 – Object Oriented Programming

Department of Computer Science, Virtual University of Pakistan


Lab 01
Consider the following scenario and identify all objects, their attributes and behaviors.

In Virtual University bookshop, the handouts of all courses are provided at reasonable price. The
handouts are made in accordance with the video lectures recorded by famous professors. It is a step to
facilitate students to easily digest the course contents.

Solution:

BookShop

Characteristics (Attributes) Behavior (Operations)

Name Set Order

Address Get Order

Phone No Confirm Order

Deliver Order

Update Order

Receive Payment

Handouts

Characteristics (Attributes) Behavior (Operations)

Title Download

Author Name Upload

Number of Pages Read

Number of Chapters Write

Created Date Edit

Modified Date

1|Page
Video Lecture

Characteristics (Attributes) Behavior (Operations)

Video Lecture No Record

Video Name Upload

Video Duration Download

Video URL Watch

Stop

Forward

Reverse

Increase Speed

Decrease Speed

Increase Volume

Decrease Volume

Playback

Professor

Characteristics (Attributes) Behavior (Operations)

Name Teach

Age Develop Assignment

Gender Develop Quiz

Employee ID Develop GDB

Qualification Prepare Exam

Specialization Take Exam

Experience Mark Activities

2|Page
Student

Characteristics (Attributes) Behavior (Operations)

Name Study

Age Give Exam

Gender Attempt Activities

Student ID

Study Program

Current Semester

CGPA

Course

Characteristics (Attributes) Behavior (Operations)

Course Code Add Course Information

Course Title Publish Course Information

Credit Hours View Course Information

Total Marks Edit Course Information

Course Instructor

3|Page
Course Content

Characteristics (Attributes) Behavior (Operations)

Number of Topics Upload

Topic No View

Topic Description Write

Composed by Edit

Published by

Note: Everyone visualizes real life problems in different ways, so solutions


may vary from student to student. Further, Students can also add more
Attributes/ Behaviors.

4|Page
Lab 02
In the below diagram, we have two different types of file classes (PDF and Video). You are required to
apply the concept of generalization on the given classes and draw class diagram showing this
generalization relationship.

5|Page

You might also like