Systems and Software Engineering 3

Page 1

System and Software Engineering 3

Coursework Software Modelling Using UML

Report TUTOR: Ken Rotter

STUDENT NAME: Arvydas Gordejevas

STUDENT NO: 2602021

SUBMISSION DATE: 17th May 2011


Contents 1. Introduction ............................................................................................................................... 2 1.1 Chosen Proposal .................................................................................................................. 2 1.2 Client .................................................................................................................................... 2 2.

Basic Requirements ................................................................................................................... 2

3. Gantt Chart ................................................................................................................................ 3 4. Use Case Diagram ...................................................................................................................... 3 5. Class, Responsibilities, Collaborations (CRC) Cards ................................................................... 7 6. Derived Suitable Objects and Classes ...................................................................................... 10 7. Collaboration/Communication Diagrams ................................................................................ 10 8.

Class Diagrams ......................................................................................................................... 12

9.

Interaction/Sequence Diagrams .............................................................................................. 13

10. State Diagrams ......................................................................................................................... 13 11. Programming Language ........................................................................................................... 15 11.1 Why PHP and MySQL ....................................................................................................... 15 11.2 Code for a Class ................................................................................................................ 15 12. Additional Stage ....................................................................................................................... 18

Page | 1


1. Introduction We have been requested to propose a case study, which we would like to use as the basis for the software modelling design. It was our task to assess this present system with regard to computerising it. For this project progression in visualising and planning the software, a graphical aid UML (Unified Modelling Language) was used in development.

1.1 Chosen Proposal The purpose of the chosen software development project is to increase effectiveness of the company by optimizing work of employees, improving quality of service and helping to build the history of communication with the customer in a single system.

1.2 Client The client of this software project is “Termolink”. They are engineering company which specializes in industrial heat engineering, providing services ranging from technical issues of economic analysis to product and software installation, start‐up and coordination. Due to a big company like this, it is hard to maintain a good workflow of the company. Therefore director of the company wants to see in a real time what and how many project led by his company, people who implement them, and those who doesn’t have work. It is also important that the leader will be able to follow the progress of the project, noting the risks to the causes. But the main thing is to help manage their customer information.

2. Basic Requirements The following information is a basic client requirement and understanding of their purpose: • •

• •

All information stored in one place. So no more digging through various spreadsheets, emails, and database: Everything employee needs is under one program. When customer support is top‐notch, everyone wins—customers, employees, and the company’s bottom line. Capture all customer information via phone, email, Web, and chat in one place to provide best service every time. Close deals more quickly with one place to store and update information, record interactions, and track deal progress. To get better visibility into the business. Sometimes the information needs to be accessed from outside the office to ensure the project is done correctly, make a note to the rest of the team about the project, and other useful appurtenances.

Next are the features of the application in more details (taken from the project brief): • • •

Each employee’s work is conveniently visible. Automatic reminder of planned activities. Managing deadlines. Page | 2


• • • • •

• •

Convenient and fast data exchange with colleagues. Quick search of the proposals, contracts and other documents. Activity reports from click away. Create staff schedules for a day, week, and month. Provide information on which they can be segmented – allowing the company to understand their customers’ needs and buying habits better, and evaluating customers by the frequency of purchase, revenue and profit levels. Storing history information of actions with the customers. Therefore allowing for new employees to take work over with the clients easier and faster, if their previously worked manager left the company. Following the work of sales department performance, and analyzing the individual manager’s steps. An opportunity to perform sales transactions being away from the office, synchronizing data with a central database via the Internet.

3. Gantt Chart 1 Using bars to represent project activities, the Gantt chart shows when the project and each activity start and end against a horizontal timescale. Although the Gantt was developed around 1917 and is the oldest formal scheduling tool, it is still widely used. Developing a Gantt chart takes several steps. Though the first step – determine level of detail and identify activities – is normally part of scope planning. Information about the scope helps analyze and understand the project activities that are being scheduled. Next step relates to priorities, activity sequencing, and duration estimating. For this project a Gantt chart has been created (page 4) in order to help with the time management in completing the project on time. And in most of the cases it was useful to keep notice where at the particular time your project should be, even if you are behind – it was always helping to get back on track.

4. Use Case Diagram 2 A use case is a description of a system’s behaviour from a user’s standpoint. For system developers, the use case is a valuable tool: It’s a tried‐and‐true technique for gathering system requirements from a user’s point of view. Obtaining information from the user’s point of view is important if the goal is to build a system that real people (and not just computerphiles) can use. Use case diagram was produced based on basic requirements (page 5). Though after the first diagram the understanding of “Termolink” needs came clearer and after the meeting with the client second use case diagram have been produced (page 6). 1

Milosevic, D.Z. (2003) Project Management ToolBox: Tools and Techniques for the Practicing Project Manager. 1st ed. New Jersey: John Wiley & Sons. 2 Schmuller, J. (2004) Sams Teach Yourself UML in 24 Hours. 3rd ed. USA: Sams.

Page | 3


Page | 4


Page | 5


Page | 6


5. Class, Responsibilities, Collaborations (CRC) Cards 3 CRC cards are a low‐tech, yet very effective, way to determine exactly what classes we need to write, what those classes need to be able to do, and how those classes relate. CRC cards are useful because we can draw them up quickly and make changes just as quickly. Using CRC cards, we can rapidly map out the functionality of an application; when we decide to split a single class into two classes, combine two classes, or change a class name, that can be done with our CRC cards in a few seconds. Determining Classes It’s often a good idea to look at use case to find classes. Classes are nouns. We can scan use cases for all the significant nouns and use those as classes in our application. When all the candidates for classes have been selected, write them down on the CRC index cards. The next step is to determine the responsibilities for each class. Determining Class Responsibilities Assigning responsibilities is an important step because it helps to determine the viability of the class candidate. If a class candidate doesn’t have any responsibilities, it must be unnecessary, and it can be discard. If the candidate seems to have too many responsibilities, it probably needs to be divided into two or more classes. It’s important to understand what a responsibility is (and what it is not). A responsibility is essentially what a class (or an instance of the class) should be able to do or facilitate. Although there is a relationship between a class’s methods and its responsibilities, they are not identical. As we work on determining the responsibilities for the classes in application, we will most likely drop classes, add classes, and change existing classes. These revisions are a desirable part of the process, which result in well‐considered design. Determining Collaborators Many, if not most, classes cannot fulfil all their responsibilities on their own. They must rely on other classes to assist them. The assisting classes are called collaborators. Collaborators generally lend a hand either by providing data or by enabling the class to offload functionality. Therefore after we have defined classes and class responsibilities, the next step in the design phase is to determine what each class’s collaborators are. This is extremely helpful in finding additional classes that previously hadn’t been thought of.

3

Lott, J. Patterson, D. (2006) Advanced Actionscript 3 with Design Patterns. 1st ed. USA: Adobe.

Page | 7


CRC cards Class Name: Director Responsibilities • • • • • •

Create employees account Edit employees account Delete employees account Check employee acts Inherits all employee traits Inherits all secretary traits

Collaborators •

Employee

Secretary

Class Name: Employee Account Responsibilities • • •

Create employee account Edit employee account Delete employee account

Collaborators •

Employee

Secretary

Class Name: Employee Responsibilities • • • • • • • • • • • • • • •

Review inquiries Register inquiries Edit inquiries Review problems Register problems Edit problems Register program mistakes Search contracts Register new contract Edit contracts Delete contracts Register new proposal Edit proposals Delete proposals Register new personal template

Reading notes

Collaborators •

Director

Class Name: Secretary Responsibilities •

Writing notes

Collaborators • •

Employee Director

Page | 8


Class Name: Inquiries Responsibilities • •

Review inquiries Register inquiries

Edit inquiries

Collaborators •

Employee

Director

Class Name: Problems Responsibilities • • •

Review problems Register problems Edit problems

Collaborators • •

Employee Director

Class Name: Program Mistakes Responsibilities •

Register program mistakes

Collaborators • •

Employee Director

Class Name: Contracts Responsibilities • • • •

Register new contract Search contracts Edit contracts Delete contracts

Collaborators • •

Employee Director

Class Name: Proposal Responsibilities • • • •

Register new proposals Edit proposals Delete proposals Register new proposal template

Collaborators • •

Employee Director

Class Name: Notes Responsibilities • •

Reading notes Writing notes

Collaborators • • •

Employee Director Secretary

Page | 9


6. Derived Suitable Objects and Classes From the CRC cards derived objects and classes can be created. A class has a structure of three sections: name, attributes and operations.

7. Collaboration/Communication Diagrams 4 Communication diagrams realise a behavioural aspect of the model of a system. A communication diagram models interactions between life lines in a system. The emphasis of a communication diagram is on the organisational layout of the diagram elements on the page. This can be very powerful as, quite often, people will like to assign conceptual meaning to where a particular diagram element lies on a page. For example, some people like to show the flow of control going from left to right, whereas others prefer top to bottom. Another possibility is to keep geographically located similar elements on the same part of the page, which can aid comprehension of a problem. 4

Holt, J. (2004) UML for Systems Engineering: watching the wheels. 2nd ed. Herts: Institution of Engineering and Technology.

Page | 10


Communication Diagram

Page | 11


8. Class Diagrams4 Class diagrams realise a structural aspect of the model of a system and show what conceptual ‘things’ exist in a system and what relationships exist between them. The ‘things’ in a system are represented by classes and their relationships are represented, unsurprisingly, by relationships. Class diagrams are used to visualise conceptual, rather than actual, aspects of a system. Classes themselves represent abstractions of real‐life entities. The actual real‐life entities are represented by objects and, therefore, any object must have an associated class that defines what it looks like and what is does.

Page | 12


9. Interaction/Sequence Diagrams4 Sequence diagrams are one of the types of interaction diagram and, as such, behave very much like communication diagrams. Indeed, the information shown by both these types of interaction diagram is actually the same, but from a slightly different point of view. As such, sequences diagrams show life lines and the messages passed between them but with an emphasis on logical time or the sequence of messages. The main difference between a communication diagram and a sequence diagram is that communication diagrams show the high‐level behaviour of a system from a organisational point of view, whereas sequence diagrams show the high‐level behaviour of a system from the logical timing point of view.

10. State Diagrams2 The UML state diagrams provides a variety of symbols and encompasses a number of ideas, all to model the changes that just one object goes through. This type of diagram has the potential to get very complex very quickly. Is it really necessary? In fact, it is. It’s important to have state diagrams because they help analysts, designers, and developers understand the behaviour of the objects in a system. A class diagram and the corresponding object diagram show only the static aspects of a system. They show hierarchies and associations, and they tell you what the behaviours are. They don’t show you the dynamic details of the behaviours. Developers, in particular, have to know how objects are supposed to behave because they have to implement these behaviours in software. It’s not enough to implement an object: Developers have to make that object do something. State diagrams ensure that they won’t have to guess about what the object is supposed to do. With a clear picture of object behaviour, the likelihood increases that the development team will produce a system that meets requirements.

Page | 13


State Diagram

Page | 14


11. Programming Language 5 Because of the demand to access the program from anywhere ‐ the chosen program language is PHP and its database MySQL. PHP is a server‐side scripting language designed specifically for the Web. Within an HTML page, you can embed PHP code that will be executed each time the page is visited. Your PHP code is interpreted at the web server and generates HTML or other output that the visitor will see. The syntax of PHP is based on other programming language, primarily C and Perl. Therefore if you already know language such as C++, you will be productive using PHP almost immediately. MySQL is very fast, robust, relational database management system. A database enables you to efficiently store, search, sort, and retrieve data. The MySQL server controls access to your data to ensure that multiple users can work with it concurrently, to provide fast access to it, and to ensure that only authorized users can obtain access.

11.1 Why PHP and MySQL5 When setting out to build a website, you could use many different products. You need to choose the following: • • • • •

Hardware for the web server An operating system Web server software A database management system A programming or script language

Some of these choices are dependent on others. For example, not all operating systems run on all hardware, not all web servers support all programming languages and so on. But one of the best features of both PHP and MySQL is that they work with any major operating system and many of the minor ones.

11.2 Code for a Class Code for a class has been written using ‘EditPlus’ software. <!DOCTYPE HTML PUBLIC "‐//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Termolink</title> </head> <?php //module files are called from index.php // functions found in functions.php file function Company_Logo() 5

Welling, L. Thomson, L. (2009) PHP and MySQL Web Development. 4th ed. USA: Pearson Education.

Page | 15


// adding company logo Termolink { ?> <table cellspacing=0 cellpadding=0 style="position: inherit; width: 10%; padding‐ top:10px; padding‐bottom:10px;" align=center> <tr> <td width="35" height="35"><img src="./termolink_logo.gif" border="0"></td> </tr> <tr> <tr> <td width="35" height="35"><img src="./main_pik.jpg" border="0"></td> </tr> </table> <? } // Keeps all given information (data) inside the folder. case('Add'): if(!$permission[Clients][Add]) exit; $error = false; $postdata = $_POST[postdata]; if($postdata[Title]) { $Title = sq($postdata[Title]); $co_code = sq($postdata[co_code]); $vat_code = sq($postdata[vat_code]); $telephone = sq($postdata[telephone]); $fax = sq($postdata[fax]); $email = sq($postdata[email]); $www = sq($postdata[www]); $extra_info = sq($postdata[extra_info]); $address = sq($postdata[address]);

if($_FILES[logo][name]) { $folder = "./".$Title."_"; $uploadfile = $folder .basename($_FILES['logo']['name']);

move_uploaded_file($_FILES['logo']['tmp_name'], $uploadfile);

?>

}

$logo = $_FILES['logo']['name']; }

Page | 16


// Creating inputs to type information <center>Add New Company: <form method="post" action="" enctype="multipart/form‐data"> <table width=600 align=center> <tr> <td width=300>Title:</td> <td><input type="text" name="postdata[title]"></td> </tr> <tr> <td>Company Code:</td> <td><input type="text" name="postdata[co_code]"></td> </tr> <tr> <td>VAT Code:</td> <td><input type="text" name="postdata[vat_code]"></td> </tr> <tr> <td>E‐mail:</td> <td><input type="text" name="postdata[email]"></td> </tr> <tr> <td>Telephone:</td> <td><input type="text" name="postdata[telephone]"></td> </tr> <tr> <td>Fax:</td> <td><input type="text" name="postdata[fax]"></td> </tr> <tr> <td>www:</td> <td><input type="text" name="postdata[www]"></td> </tr> <tr> <td>Logo:</td> <td><input type="file" name="logo"></td> </tr> <tr> <td>Address:</td> <td><textarea cols=30 rows=6 name="postdata[address]"><?=$postdata[address]?></textarea></td> </tr> <tr> <td>Extra information:</td> <td><textarea cols=30 rows=6 name="postdata[extra_info]"><?=$postdata[extra_info]?></textarea></td> </tr> <tr height=60> <td colspan=2><center><input type="submit" value="Submit"></td> </tr> </table> </form> Page | 17


12. Additional Stage To successfully deliver the software in a suitable state to the customer would need an additional stage like putting all programming language on internet for it to be accessed, and therefore more information need to be found about the MySQL database. The classes have been finished, but there always will be more demand as the program is used, more things you will think about and that’s there the programme has always to watch for any demands and always check for any mistakes and keep program running smoothly by updating it. Page | 18


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.