# Exercises and Quizzes on the Critical Path Method

## Simple Example

You and a colleague are working on a project that has a main program and two independent classes. Once the initial test program is written you can start on the two classes (A and B say) and develop them without tripping over each other. Once the two classes have passed unit test then you can start on the main program that depends on them.
Table
#DescriptionDuration(Days) Predecessors
1Develop test1-
2Develop A11
3Develop B21
4Develop Main12,3
-Done-4

(Close Table)
Diagram done in class.

CPM done in class.

Before you can start a Joint Application Development -- -- --(JAD)
meeting you must Email the participants and prepare the Audio Visual aids -- -- --(AVs)
and before you can send the Email you need to prepare the information in the Email and arrange the room. You can't prepare the information or the AVs without preparing the agenda for the meeting. Before you arrange the room and prepare the agenda you need to get approval for the JAD meeting from the participants. And before you can get approval you need to make contact with the participants.

Here is a table of activities, what numbers do you put in the "Predecessors" column:
Table
#DescriptionDuration(Hours)Predecessors
1Contact people1?
2Get approval5?
3Arrange Room4?
4Prepare Agenda11?
5Prepare Info4?
6Prepare AVs8?
7Email people1?
-Done-8

(Close Table)

Draw an Activity Diagram of the above activities.

Calculate the earliest times of each event.

Calculate the latest times of each event.

Calculate slack and highlight the critical path.

## Planning a Training Session

Towards the end of a project an important activity is to train the users in using the new system. The table describes the activities needed.
Table
#DescriptionDuration(Hours)Predecessors
1Invite users1-
2Study manual51
3Book room31
4Prep. Handouts32
5Prep. Slides44
6Practice15
7Training33,6
-Done-7

(Close Table)

Draw the activity diagram.

Calculate earliest times.

Calculate latest times.

Calculate slack times for each activity and show the critical path.

## Planning a Training Session -- Version 2

Here is a different WBS -- draw the diagram and do the CPM on it.
Table
#DescriptionDuration(Hours)Predecessors
1Invite users1-
2Study manual51
3Book room31
4Prep. Handouts22
5Copy Handouts14
6Prep. Slides44
7Practice16
8Training35,7
-Done-8

(Close Table)

## My First PHP Page

I wanted to allow students to search my CS372 pages. To do this I needed an HTML form and a PHP script. Problem: I didn't know any PHP. Here are my activities for the first 3 iterations.
Table
#DescriptionDuration(Hours)Predecessors
1Design Search form1-
2Learn some PHP2-
3Draft PHP12
4Alpha test11,3
5Improve form14
6Improve PHP24
7Beta test15,6
8Release 1.017
9Learn PHP RegExs22
10Update PHP28,9
11Update form & test110
-Release 2.0-11

(Close Table)
Use UML Activity diagrams and the critical path method to work out how much time this project will take and which activities are critical.

## Setting up a Seminar

The seminar committee has a lot of activities it must do to prepare for a seminar. How much lead time and what activities are critical?
Table
#DescriptionDuration(Hours)Predecessors
1Find time+place2-
2Book room11
3Get Snacks21
4Get coffee11
5Draft flier22
6Put on Dept Events Board12
7Check Fleer15
8Post Flier26,7
9Email Flier16,7
10Prep Handout10-
11Order Equip11
12Prep AVs610
13Check equipment111
-Done-3,4,8,9,10,12,13

(Close Table)
Use an activity diagram to check the above table for logical errors. Correct and use the Critical Path Method to work out the earliest time the seminar can be ready. Then work out the latest times and the critical path.

## Implementing a Use Case in an existing System

You have been working with a complex system for several years and you have a new use case to implement on it.
Table
#DescriptionDuration(Hours)Predecessors
1Write Use case1-
2Develop GUI21
3Database11
4Design tests21
6Cross check Gui vs DB12,3
7HTML Pages36
8SQL code46
9Integrate27,8
10Test24,9
-Done-10

(Close Table)

## Starting a Masters Project

In the CSCI Department at CSUSB many graduate students finish their Masters degree by tackling a realistic project -- for example a wireless system for a hospital that lets doctors submit prescriptions directly to the pharmacy for later pick up or delivery. But all have a similar starting process
Table
#DescriptionDuration(Weeks)Predecessors
1Write SRS1-
2Get 3 faculty2-
3Improve SRS31,2
4Oral Examination21,2
5Design13,4
6Get M/C23,4
7Revue plans15
8Install system software16
9Redesign software17
10Install patches18
-Done-9,10

(Close Table)

# Abbreviations

1. TBA::="To Be Announced".
2. TBD::="To Be Done".