0% found this document useful (0 votes)
42 views5 pages

Spring 2024 Cs304p 1 Sol

Uploaded by

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

Spring 2024 Cs304p 1 Sol

Uploaded by

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

Virtual University of Pakistan SEMESTER Spring 2024

CS304P – Object Oriented Programming (Practical)


Assignment No.1 (Graded)

Maximum Marks: 20
Instructions Due Date: 29 April 2024

The purpose of this assignment is to give your hands-on practice. It is expected that students
will solve the assignment themselves. The following rules will apply during the evaluation
of the assignment.

● Cheating from any source will result in zero marks in the assignment.
● The submitted assignment does NOT open or the file is corrupted.
● No assignment after the due date will be accepted
Students can submit HTML, Images and Plain text only in this inline Mode. The
table can also be drawn in the interface.
● DOC/pdf File uploading option will not be available in inline assignment
submission.
Uploading Assignment Instruction
Follow the given instructions to submit the inline assignments.
• Images of the following formats can be inserted in the inline assignment interface.

• Images and tables can be inserted using the following highlighted options in the
interface.
Virtual University of Pakistan SEMESTER Spring 2024

Objective & Learning Outcome


After completing the assignment, the student will be able to identify Object, attributes and their
operations and also to make class diagram.

Question No. 1 (20 Marks)

Suppose you are building an online shopping platform “One Click Shopping”. On this platform you can
buy products from different available categories. To place an order, first you have to register as a user
and login to complete the order.
To place an order, select the product from the list and add it into the shopping cart. You can make
payment through online credit card or cash on delivery. After making payment your order will be
completed.

As a student of OOP (Object oriented programming) course you have to perform following tasks using
above scenario.

1. Extract the Objects, their attributes (Characteristics) and behaviors (Operations).

2. Identify the generalization relationship and mention the parent and child classes

Note:

Solution of part # 1 should be in table format like given below:

Object Attribute Operations

Part # 1:

Object Attribute Operations

User User ID Register()

Name Login()

Password Logout()

Email

Product Product ID displayDetails()


Name

Description

Price

Shopping Cart Cart ID addItem()

No of Items removeItem()

Total Price totalPrice()

displayCart()

checkout()

Order Order ID cancelOrder()

User ID trackOrder()

Items

Total Price

Order Status

Payment Payment ID processPayment()

User ID

Amount

COD Delivery Address scheduleDelivery()

Delivery AgentID confirmPayment()

Credit Card Card Number validateTransaction()

Card Holder Name

CCV

Card Expiray Date

Sample output for part # 2 is given below, your solution output should be like this.
Part # 2:

This assignment will covers the concepts discussed in labs 01-03.


Note: Plagiarism will be checked for each question. Please answer the questions in your
own words and marks will be awarded based on your answer and plagiarism report.

For any query about the assignment, contact at email [email protected]

You might also like