Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
6 views47 pages

Print Ooad Lab Final

The document provides an overview of various UML modeling tools, particularly ArgoUML, which supports all UML 1.4 diagrams and offers features like code generation and reverse engineering. It also details different UML diagrams such as use case, class, sequence, and statechart diagrams, explaining their components and relationships. Additionally, it covers Selenium testing for web applications, including setup and example code for automated testing in Google Chrome.

Uploaded by

mudaliarv4
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)
6 views47 pages

Print Ooad Lab Final

The document provides an overview of various UML modeling tools, particularly ArgoUML, which supports all UML 1.4 diagrams and offers features like code generation and reverse engineering. It also details different UML diagrams such as use case, class, sequence, and statechart diagrams, explaining their components and relationships. Additionally, it covers Selenium testing for web applications, including setup and example code for automated testing in Google Chrome.

Uploaded by

mudaliarv4
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/ 47

CASE TOOLS AND TESTING TOOLS LAB

ArgoUML
ArgoUML is an open-source UML modeling tool that allows users to create, edit, and visualize
UML diagrams. UML stands for Unified Modeling Language and is a standardized language
used to model software systems. ArgoUML supports all UML 1.4 diagrams and provides a
user-friendly interface for creating and editing them.
ArgoUML was initially developed by the Tigris.org community and has since been maintained
by the ArgoUML project. It is written in Java and can be run on any platform that supports
Java.
Some of the key features of ArgoUML include the ability to:
• Create all UML 1.4 diagrams, including use case, class, sequence, activity, state,
collaboration, and component diagrams.
• Generate code from UML diagrams in several programming languages, including Java,
C++, and PHP.
• Reverse engineer code into UML diagrams.
• Export UML diagrams in several formats, including SVG, PNG, and GIF.
• Collaborate on UML diagrams using version control systems such as SVN or CVS.
Overall, ArgoUML is a powerful UML modeling tool that is easy to use and offers a range of
features for software developers and designers.
USE CASE DIAGRAM
COLLABORATION DIAGRAM

1. Objects: The representation of an object is done by an object symbol with its name and
class underlined, separated by a colon.
In the collaboration diagram, objects are utilized in the following ways:
• The object is represented by specifying their name and class.
• It is not mandatory for every class to appear.
• A class may constitute more than one object.
• In the collaboration diagram, firstly, the object is created, and then its class is specified.
• To differentiate one object from another object, it is necessary to name them.
2. Actors: In the collaboration diagram, the actor plays the main role as it invokes the
interaction. Each actor has its respective role and name. In this, one actor initiates the
use case.
3. Links: The link is an instance of association, which associates the objects and actors.
It portrays a relationship between the objects through which the messages are sent. It is
represented by a solid line. The link helps an object to connect with or navigate to
another object, such that the message flows are attached to links.
4. Messages: It is a communication between objects which carries information and
includes a sequence number, so that the activity may take place. It is represented by a
labeled arrow, which is placed near a link. The messages are sent from the sender to the
receiver, and the direction must be navigable in that particular direction. The receiver
must understand the message.
CLASS DIAGRAM

Upper Section: The upper section


encompasses the name of the class.
Middle Section: The middle section
constitutes the attributes, which
describe the quality of the class. The
attributes have the following
characteristics:
a) The attributes are written
along with its visibility
factors, which are public (+),
private (-), protected (#), and
package (~).
b) The accessibility of an
attribute class is illustrated by
the visibility factors.

Lower Section: The lower section


contains methods or operations. The
methods are represented in the form
of a list, where each method is
written in a single line.
Relationships

In UML, relationships are of three


types:

1. Dependency: A dependency is a
semantic relationship between two or
more classes where a change in one
class cause changes in another class.
It forms a weaker relationship.
In the example, Student_Name is
dependent on the Student_Id.
2. Generalization: A generalization
is a relationship between a parent
class (superclass) and a child class
(subclass). In this, the child class is
inherited from the parentclass.
For example, The Current Account,
Saving Account, and Credit Account
are the generalized form of Bank
Account.

Association: It describes a static or


physical connection between two or
more objects. It depicts how many
objects are there in the relationship.
For example, a department is
associated with the college.

Multiplicity: It defines a specific


range of allowable instances of
attributes. In case if a range is not
specified, one is considered as a
default multiplicity.

For example, multiple patients are


admitted to one hospital.
Aggregation: An aggregation is a
subset of association, which
represents has a relationship. It is
more specific then association. It
defines a part-whole or part-of
relationship. In this kind of
relationship, the child class can exist
independently of its parent class.

The company encompasses a number


of employees, and even if one
employee resigns, the company still
exists.

Composition: The composition is a


subset of aggregation. It portrays the
dependency between the parent and
its child, which means if one part is
deleted, then the other part also gets
discarded. It represents a whole-part
relationship.

A contact book consists of multiple


contacts, and if you delete the contact
book, all the contacts will be lost.

SEQUENCE DIAGRAM

Lifeline

An individual participant in the sequence


diagram is represented by a lifeline. It is
positioned at the top of the diagram.
Actor

A role played by an entity that interacts with


the subject is called as an actor. It is out of
the scope of the system. It represents the role,
which involves human users and external
hardware or subjects.

Activation

It is represented by a thin rectangle on the


lifeline. It describes that time period in which
an operation is performed by an element,
such that the top and the bottom of the
rectangle is associated with the initiation and
the completion time, each respectively.

Messages

The messages depict the interaction between


the objects and are represented by arrows.
They are in the sequential order on the
lifeline. The core of the sequence diagram is
formed by messages and lifelines.

Call Message

It defines a particular communication


between the lifelines of an interaction, which
represents that the target lifeline has invoked
an operation.
Return Message

It defines a particular communication


between the lifelines of interaction that
represent the flow of information from the
receiver of the corresponding caller message.

Self Message

It describes a communication, particularly


between the lifelines of an interaction that
represents a message of the same lifeline,
has been invoked.

Recursive Message

A self message sent for recursive purpose is


called a recursive message. In other words, it
can be said that the recursive message is a
special case of the self message as it
represents the recursive calls.

Create Message

It describes a communication, particularly


between the lifelines of an interaction
describing that the target (lifeline) has been
instantiated.
Destroy Message

It describes a communication, particularly


between the lifelines of an interaction that
depicts a request to destroy the lifecycle of
the target.

Duration Message

It describes a communication particularly


between the lifelines of an interaction,
which portrays the time passage of the
message while modeling a system.

STATECHART DIAGRAM

• Initial state: It defines the initial state (beginning) of a system, and it is represented by
a black filled circle.
• Final state: It represents the final state (end) of a system. It is denoted by a filled circle
present within a circle.
• Decision box: It is of diamond shape that represents the decisions to be made on the
basis of an evaluated guard.
• Transition: A change of control from one state to another due to the occurrence of
some event is termed as a transition. It is represented by an arrow labeled with an event
due to which the change has ensued.
• State box: It depicts the conditions or circumstances of a particular object of a class at
a specific point of time. A rectangle with round corners is used to represent the state
box.
ACTIVITY DIAGRAM

The control flow of activity is represented by


control nodes and object nodes that
illustrates the objects used within an activity
OR action to be taken

Activity partition /swimlane

The swimlane is used to cluster all the related


activities in one column or one row. It can be
either vertical or horizontal. It used to add
modularity to the activity diagram.

Forks

Forks and join nodes generate the concurrent


flow inside the activity. A fork node consists
of one inward edge and several outward
edges. It is the same as that of various
decision parameters. Whenever a data is
received at an inward edge, it gets copied and
split crossways various outward edges. It
split a single inward flow into multiple
parallel flows.
Join nodes
Join nodes are the opposite of fork nodes. A
Logical AND operation is performed on all
of the inward edges as it synchronizes the
flow of input across one single output
(outward) edge.
DEPLOYMENT DIAGRAM

COMPONENT DIAGRAM
A component diagram is used to break down a large object-oriented system into the smaller
components, so as to make them more manageable. It models the physical view of a system
such as executables, files, libraries, etc. that resides within the node. It visualizes the
relationships as well as the organization between the components present in the system. A
component is a single unit of the system, which is replaceable and executable.

= = = = = = = == = = = == = = = = = = = = = = = = = = = = = = = = = = = == = = = = = = =

SELENIUM TESTING
Selenium is a popular tool for automated testing of web applications. It supports different web
browsers including Google Chrome. Here are the steps to perform Selenium testing in Google
Chrome:
1. Download and install the latest version of Google Chrome on your machine.
2. Download and install the latest version of the Selenium WebDriver for Chrome from
the official Selenium website.
3. Set up your Selenium test environment using a programming language such as Java,
Python, or Ruby.
4. In your test code, create a WebDriver instance for Google Chrome using the following
code snippet in Java:
WebDriver driver = new ChromeDriver();
5. Use the driver instance to navigate to the URL of the web application you want to
test, interact with the web page elements, and perform actions such as clicking buttons
or entering text into fields.
Here's an example code snippet to navigate to the Google homepage and search for
"Selenium testing":
driver.get("https://www.google.com/");
WebElement searchBox = driver.findElement(By.name("q"));
searchBox.sendKeys("Selenium testing");
searchBox.submit();
6. After executing the test, you can view the results in the browser window opened by
Selenium.
Note that you may need to configure additional options for the ChromeDriver instance, such
as setting the path to the Chrome executable or enabling/disabling certain Chrome features.
You can find more information about these options in the official Selenium documentation.
1. LIBRARY MANAGEMENT SYSTEM

USE CASE DIAGRAM


ACTIVITY DIAGRAM FOR ISSUE BOOK IN LIBRARY
ACTIVITY DIAGRAM FOR RETURN BOOK IN LIBRARY
CLASS DIAGRAM

STATE DIAGRAM FOR BOOK


STATE DIAGRAM FOR LIBRARIAN

COLLABORATION DIAGRAM FOR ISSUING BOOK:


COLLABORATION DIAGRAM FOR RETURNING BOOK:

SEQUENCE DIAGRAM FOR ISSUING BOOK:


SEQUENCE DIAGRAM FOR RETURNING BOOK
COMPONENT DIAGRAM

DEPLOYMENT DIAGRAM
PACKAGE DIAGRAM:

CODING:
public class Member Record
{
public int memberID;
public int type;
public int dateOfMembership;
public int noBookIssued;
public int maxBookLimit;
public int name;
public int address;
public int phone No;
public Member Record ()
{
}
public void retriveMember ()
{
}
public void increaseBookIssued ()
{
}
public void decreaseBookIssued ()
{
}
public void payBill ()
{ }}
2. ATM MANAGEMENT SYSTEM
1. USE CASE DIAGRAM

CLASS DIAGRAM
SEQUENCE DIAGRAM

COLLABORATION DIAGRAM
ACTIVITY DIAGRAM Customer Side (Balance Inquiry)

COMPONENT DIAGRAM
STATECHART DIAGRAM

DELOYMENT DIAGRAM

CODING:

System:
public class System {
public void invalidCard() {
}
public void make_payment() {
}
}
import java.util.Vector;
public class bank_officer {
public Integer off_name;
public String off_id;
public Integer off_design;
public Vector mySystem;
public void deposit_fund() {
}
public void change_pin() {
}
}
import java.util.Vector;
public class Customer {
public Integer cust_name;
public String cust_id;
public Integer cust_addr;
public Vector mybank_officer;
public Vector mySystem;
public void view_balance() {
}
public void enter_pin() {
}
public void get_ministmt() {
}
public void withdrawFunds() {
}
}
3. STUDENT INFROMATION SYSTEM
USE CASE DIAGRAM FOR ADMINISTRATOR

USE CASE DIAGRAM FOR STUDENT

Student Login

Message

Attendance

Student
Databases
Profile

Result

Time Table

Fee

Library

Log Out
CLASS DIAGRAM

Login Student details


+username +Name
+password +Address
+Login() +Age
+validation() +Course
+get_data() +Department
+display() +Phone no

+get_data()
+Display()

Update details
+Student details
+Result details

+Updae_info()
+get_detail()
+Display()

SEQUENCE DIAGRAM FOR VALIDITY

Admin/Student Validation Database

1 : Request for validity()

2 : Check for validity()

3 : Validate()

4 : Successful validate()
SEQUENCE DIAGRAM FOR ADMINISTRATOR

Login ReqAdd Student ReqUpdate Student Database


Admin

1 : Enter Credentials for login()

2 : Check for validity()

3 : Valid user()

4 : Successful login()

5 : Enter details for adding a student()

6 : Add()

7 : Successful()

8 : Successfully added()

9 : Enter credentials for update student record()

10 : Update()

11 : Successful()

12 : Successfully Updated()
SEQUENCE DIAGRAM FOR STUDENT

Student Login ReqView Profile


ReqView Details Database

1 : Enter credentials for login()

2 : Check for Validity()

3 : Valid()

4 : Valid login()
5 : Request for view profile()

6 : Request()

7 : Set Details()

8 : Get the details()


9 : Request for view Details()

10 : Request()

11 : Set Details()

12 : Get the Details()

COLLABORATION DIAGRAM FOR VALIDITY

Database
3 : Validate()

2 : Check for validity()

Validation

1 : Request for validity()

4 : Successful validate()

Admin/Student
COLLABORATION DIAGRAM FOR ADMINISTRATOR

Database

3 : Valid user()
6 : Add()
10 : Update()

7 : Successful() 2 : Check for validity()


11 : Successful()
Login

ReqAdd Student ReqUpdate Student

1 : Enter Credentials for login()

8 : Successfully added()
4 : Successful login()
12 : Successfully Updated()

9 : Enter credentials for update student record()

5 : Enter details for adding a student()

Admin

COLLABORATION DIAGRAM FOR STUDENT

Database

3 : Valid()
6 : Request() 2 : Check for Validity()

10 : Request()
7 : Set Details()

11 : Set Details() Login

ReqView Profile

8 : Get the details() ReqView Details

4 : Valid login()

1 : Enter credentials for login()

Object1
5 : Request for view profile()
9 : Request for view Details()

12 : Get the Details()

Student
ACTIVITY DIAGRAM

Login

Student Registration

back to registration
If No
Yes

Select Course

Profile

Result

Fee

Library

Log Out
DEPLOYMENT DIAGRAM

Student Information System

Administrator Student Access Database

CODING:
Login:
import java.util.Vector;
public class Login {
public Integer username;
public Integer password;
public Vector my;
public Vector myStudent details;
public Vector myUpdate details;
public void Login() {
}
public void validation() {
}
public void get_data() {
}
public void display() {
}
}
Student details:
import java.util.Vector;
public class Student details {
public Integer Name;
public Integer Address;
public String Age;
public Integer Course;
public Integer department;
public String phone no;
public Vector my;
public Vector myLogin;
public void get_data() {
}
public void Display() {
}
}
Update details:
import java.util.Vector;
public class Update details {
public Integer Student details;
public Integer Result details;
public Vector myLogin;
public Vector myStudent details;
public void Update_info() {
}
public void get_data() {
}
public void Display()
{
}}
4. MATRIMONY SERVICE
USE CASE DIAGRAM

CLASS DIAGRAM
ACITVITY DIAGRAM

COLLABORATION DIAGRAM
STATECHART DIAGRAM

DEPLOYMENT DIAGRAM

CODING:
import java.util.Vector;
public class Admin
{
public Vector Search for;
public Vector myServices;
public void searchprofile() {
}
public void addservice() {
}
public void updateservices() {
}
}
Calculatemoonsign-star:
import java.util.Vector;
public class Calculatemoonsign-star {
public Integer DateTimeZone;
public Integer Logistudelattudemoonsign;
public Integer Star;
public Vector myuser;
public void greatresult() {
}
}
import java.util.Vector;
public class Customer {
public Vector myviewprofile;
public Vector myServices;
public Vector myuser;
public Vector mysearch;
public void ViewProfile() {
}
public void SearchProfile() {
}
public void Viewservices() {
}
public void Updateprofile() {
}
}
Search:
import java.util.Vector;
public class search {
public Vector Search for;
public Vector myCustomer;
}
Services:
import java.util.Vector;
public class Services {
public Integer Service_Name;
public Integer Service_Ph.no;
public Integer Service_Address;
public Vector myCustomer;
public Vector myAdmin;
}
User:
import java.util.Vector;
public class user {
public Integer user_Id;
public Integer Matri_id;
public Integer Gender;
public Integer Age;
public Vector myCalculatemoonsign-star;
public Vector myCustomer;
public void Login() {
}
public void Register() {
}
public void Searchprofile() {
}
public void Calculatemoonstarsing() {
}
}
Viewprofile:
import java.util.Vector;
public class viewprofile {
public Vector myCustomer;
}
5. STOCK MANAGEMENT SYSTEM
USE CASE DIAGRAM

ACTIVITY DIAGRAM
CLASS DIAGRAM

SEQUENCE DIAGRAM
COLLABORATION DIAGRAM

STATECHART DIAGRAM
PACKAGE DIAGRAM

COMPONENT DIAGRAM
DEPLOYMENT DIAGRAM

CODING:

Administrator:
public class Administrator {
public Integer Name;
public void Login() {
}
public void Updation() {
}
public void Administrator() {
}
}

Company Manager:
import java.util.Vector;
public class Company Manager {
public Integer Name;
private Integer CustomerName;
public Vector myCustomer;
public void Quotation() {
}
public void Payment() {
}
public void Delivery() {
}
public void CompanyManager() {
}
}

Customer:
public class Customer {
public Integer Name;
public void purchase() {
}
public void Updation() {
}
public void Administrator() {
}
}
SELENIUM TESTING

package selenium2;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
public class nvn {
public static void main(String args[]) throws InterruptedException {
System.setProperty("webdriver.chrome.driver","C:\\testing\\chromedriver_win32\\chromedri
ver.exe");
//WebDriver driver = new ChromeDriver();
ChromeOptions options = new ChromeOptions();
options.addArguments("--remote-allow-origins=*");
WebDriver driver = new ChromeDriver(options);
driver.get("https://www.freeplacement.infogrotech.com/");
driver.manage().window().maximize();
Thread.sleep(10000);
//driver.findElement(By.name("q")).sendKeys("Kumar");
}
}

You might also like