Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

CS304 – Object Oriented Programming

Assignment No.1 (Graded)

Maximum Marks: 20
Instructions
Due Date: 29 April 2024

The purpose of this assignment is to give you 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 & Plain text only in this inline Mode. You
may also insert an image file/table.
● DOC/pdf File uploading option will not be available) in inline assignment
submission.
Uploading Assignment Instruction
Follow the given instructions to submit an inline assignment.
● You can use MS Visio/ MS Paint for drawing the Class Diagram etc.

● Students can insert the images in the following formats.

● Images and tables can be inserted using the following highlighted option in the
interface.
Objective & Learning Outcome

Objectives:
The objectives of this assignment are to:
 Identify the main objects (entities).
 Find the necessary attributes and functions associated with each object.
 Identify the relationships among objects.
 Construct a comprehensive class diagram.

Learning Outcomes:
After completing this assignment, students will be able to:
 Develop a UML class diagram.

Question (20 Marks )

Scenario:

A freelance marketplace is an online platform that connects freelancers with clients who need
specific projects/jobs completed. These platforms serve as intermediaries that help both parties
find each other, and ensure the secure exchange of services and payments.
On the freelance marketplace, there can be two types of users: one is a client who posts the jobs
or projects, and the other is a freelancer who bids to complete those projects.
After winning the project, freelancers complete the project and submit it. After evaluating the
project, the client approves the project, and then payment is released to the freelancer.

Based on the above scenario there are the following key features of a freelancing platform:
1. Freelancers create profiles that include their skills, experience, and portfolio of work.
2. Clients post projects or job descriptions, mentioning the skills required, project
timelines and budget etc. Freelancers can then decide if they wish to apply or bid for the
project.
3. A freelancer can bid on the project. Clients then review these bids and select a
freelancer based on factors such as price, experience, and previous reviews etc.
4. Payment may be released to the freelancer only after the client approves the completed
work/project.
5. Once a freelancer has completed the project, the client must give feedback in the form
of a review. This review helps other clients while selecting this freelancer.

The tasks you have to do are:

1. Extract the main objects (entities) of the above system.


2. Find the necessary attributes and functions that need to be associated with each object.
3. Identify the relationships among identified objects.
4. Develop a final comprehensive Class diagram using the above three steps showing all
objects (along with their attributes and functions) and the relationships between objects.

Note: Please note that you have to provide only the final class diagram as a solution of
the assignment. There is no need to provide the solution of the first three steps.

Topics Covered: The assignment covers the topics from 1 to 06.

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 CS304@vu.edu.pk

### Step 1: Identify Main Objects (Entities)

From the scenario, the following main entities can be identified:


1. **Freelancer**
2. **Client**
3. **Project**
4. **Bid**
5. **Review**

### Step 2: Attributes and Functions for Each Object

**1. Freelancer**
- *Attributes*: FreelancerID, Name, Skills, Experience, Portfolio
- *Functions*: createProfile(), updateProfile(), submitBid(), completeProject()

**2. Client**
- *Attributes*: ClientID, Name, ContactInfo
- *Functions*: postProject(), selectBid(), releasePayment(), provideFeedback()
**3. Project**
- *Attributes*: ProjectID, Description, RequiredSkills, Timeline, Budget, Status
- *Functions*: updateStatus(), getBids()

**4. Bid**
- *Attributes*: BidID, ProjectID, FreelancerID, ProposedPrice, ProposedTimeline, BidStatus
- *Functions*: submit(), withdraw(), update()

**5. Review**
- *Attributes*: ReviewID, ProjectID, ClientID, FreelancerID, Rating, Comment
- *Functions*: submitReview()

### Step 3: Identify Relationships Among Objects

1. **Freelancer to Bid**: One-to-many (One freelancer can submit multiple bids)


2. **Bid to Project**: Many-to-one (Multiple bids can be associated with one project)
3. **Client to Project**: One-to-many (One client can post multiple projects)
4. **Project to Review**: One-to-one (Each project can have one review upon completion)
5. **Freelancer to Review**: One-to-many (One freelancer can have multiple reviews from
different projects)
6. **Client to Review**: One-to-many (A client can give multiple reviews for different
projects)

### Step 4: Develop a Comprehensive Class Diagram

Based on the entities, their attributes, functions, and relationships identified, the class diagram
can be sketched as follows:

```
[Client] -------------------------> [Project]
| 1 | *
| | |
| | |<---------------------------
| | | |
| | | |
| v v |
| [ClientID] [ProjectID] |
| [Name] [Description] |
| [ContactInfo] [RequiredSkills] | *
| [postProject()] [Timeline] | |
| [selectBid()] [Budget] | |
| [releasePayment()] [Status] | |
| [provideFeedback()] [updateStatus()] | |
| [getBids()] | |
| | |
| | |
| | |
| [Review] <--------------------------------------------------- |
| | ^ |
| | |1 |
| | |1 |
| | | |
| | | |
| | | |
| | |* |
| | |1 |
| | | |
| | [ReviewID] |
| | [ProjectID] |
| | [ClientID] |
| | [FreelancerID] |
| | [Rating] |
| | [Comment] |
| | [submitReview()] |
| | |
| | |
| | [Bid] <------------------------- [Freelancer]
| ------------------------------------------------------------- |
1 |1
|*
[FreelancerID]
[Name]
[Skills]
[Experience]
[Portfolio]
[createProfile()]
[updateProfile()]
[submitBid()]
[completeProject()]
```
This diagram illustrates the major entities involved in a freelance marketplace system and their
interactions, providing a basis for system implementation.eets the needs of both freelancers and
clients.

[Client] -------------------------> [Project]


| 1 | *
| | |
| | |<---------------------------
| | | |
| | | |
| v v |
| [ClientID] [ProjectID] |
| [Name] [Description] |
| [ContactInfo] [RequiredSkills] | *
| [postProject()] [Timeline] | |
| [selectBid()] [Budget] | |
| [releasePayment()] [Status] | |
| [provideFeedback()] [updateStatus()] | |
| [getBids()] | |
| | |
| | |
| | |
| [Review] <--------------------------------------------------- |
| | ^ |
| | |1 |
| | |1 |
| | | |
| | | |
| | | |
| | |* |
| | |1 |
| | | |
| | [ReviewID] |
| | [ProjectID] |
| | [ClientID] |
| | [FreelancerID] |
| | [Rating] |
| | [Comment] |
| | [submitReview()] |
| | |
| | |
| | [Bid] <------------------------- [Freelancer]
| ------------------------------------------------------------- |
1 |1
|*
[FreelancerID]
[Name]
[Skills]
[Experience]
[Portfolio]
[createProfile()]
[updateProfile()]
[submitBid()]
[completeProject()]

You might also like