Main Characteristics And Features Of Object Oriented Programming

The following task clearly explains the descriptions of the features and characteristics of the features of the object oriented programming. There are twelve principles of oop which is stated below.

What is Object Oriented Programming?

The Object oriented programming is one of the newest and most powerful paradigms. The Object-Oriented Programming mentions to the programming methodology based on the objects, in its place of just procedures and functions. These objects are planned into classes, which are allowing to the individual objects to be group together. Modern programming languages containing java, PHP and C or C++ are object-oriented languages

The "object" in an Object Oriented Programing language discusses to a instance or specific type, of the class. Each and every object has a structure related to other objects in the class, but it can be allocated individual features. An object can also call as method or functions, particular to that object. The Individual characters are may be defined as objects, according to the object which are allows them to have different skill, appearances, and abilities. The Object oriented programming makes it easier to the programmers to design and organize software programs. The important features which are help to design the object-oriented programming and design is given below:

' Development over the designed programming paradigm.

' Importance on data rather than algorithms.

' Procedural abstraction is perfected by data abstraction.

' Data and associated processes are unified, grouping objects with common attributes, operations, and semantics

The Principles of OOP

According to the principals there twelve fundamental features there are given below.

1. Encapsulation

2. Data Abstraction

3. Inheritance

4. Polymorphism

5. Extensibility

6. Persistence

7. Delegation

8. Generality

9. Object Concurrency

10. Event Handling

11. Multiple Inheritance

12. Message Passing

According to the Object Oriented programming language, it has to allow working with classes and objects as well as the implementation and use of the main four fundamental object oriented principles and concepts.

1. Encapsulation -Hide unnecessary details in classes and deliver a simple and clear interface for working.

2. Inheritance - explain how the class hierarchies develop code readability and support to the reuse of functionality.

3. Data Abstraction - to deal with objects since their important features and ignore all other details.

4. Polymorphism - explain how to work with different object in the same manner, which explain the specific implementation of some abstract behavior.

Figure 1

Encapsulation

The process, or mechanism, by which you combine code and the data it manipulates into a single unit, is commonly referred to as encapsulation. Encapsulation provides a layer of security around manipulated data, protecting it from external interference and misuse. In Java, this is supported by classes and objects.

Inheritance

New data types (classes) can be defined as extensions to previously defined types. Parent Class (Super Class) Child Class (Sub Class) Subclass inherits properties from the parent class. Parent Child

Polymorphism

Polymorphic which means 'many forms' has Greek roots. Poly ' Many, Morphos ' forms in object oriented programming Polymorphism means that it has many forms.

Polymorphism allows an object to be processed differently by data types and/or data classes. More precisely, it is the ability for different objects to respond to the same message in different ways. It allows a single name or operator to be associated with different operations, depending on the type of data it has passed, and gives the ability to rede'ne a method within a derived class.

In the above figure 4, it is shown that a simple thread could be transformed into different shapes same way polymorphism means that it could change to many different types.

Data abstraction

Abstraction is a concept which facilitates to extract out the essential information of an object. In OOP (Object orients programming), Abstraction Facilitates the easy conceptualization of real world objects into the software program.

Abstraction facilitates the easy conceptualization of real world objects, by eliminating the unnecessary details of the object. Unnecessary details? Yes, all the similar objects when you generalize, you will drop the uncommon details about the objects.

Conclusion

All the features and principles are explained clearly with examples in the above task at it also describes what is OOP and its characteristics.

1.2 Explain the Difference between Class & Object with in Object Oriented Programming with Examples.

Introduction

The Following task contains what is an object and what is a class it describes the difference between them and also it includes examples of what is an object and class.

What is an object?

The Objects are the key to understanding object-oriented program. In the real objects are the entities from which the world is involved. Every this that occurs around the world is connected to the interfaces between the objects in the world just as atoms, which are objects, associate to form partials and larger objects, the interacting entries in the world can be thought of as relation between and amongst both singular (atomic) as well as compound (composed) objects. For each object that you see, ask yourself two questions the questions are given below:

1 "What is the possible states can this object is in?"

2 "What is the possible behavior can this object performs?"

Around the world objects are share two characteristics:

' State (properties) ' describe the characters

' Behavior (methods) ' what it can do or what done for it.

State

The state of an object includes all of the static properties of the object plus the current dynamic values of each of these states. A state is distinctive or an inherent characteristic, quality, trait, or feature that distribute to making an object uniquely. Word uses an attribute, or data member, to refer to the state of an object.

Behavior

Behavior is how an object reacts and acts, in the terms of properties changes and interactions with other objects. An operation is some action that one object performs upon another in order to promote a reaction. The word called as method that uses to describe object method in java. Entreating a method reasons the behavior to take place.

Some Example for state and behavior

State Behavior

Name Talking

Color Walking

Breed Barking

Hungry Fetching

What is Class?

The class is simply a representation of a type of object. The class is a design or plan or template or a set of instructions to build a specific type of object. Each and Every object is built from a class. Every class should be designed and programmed to complete one, and only one, thing. Each and every class is designed to have only one single responsibility; many classes are used to build an entire application.

Around the world the class describes three things.

' Name

' similar properties (attributes)

' common behavior (operations)

Different between object and class

Class

' A class is a description of properties which are common of an object

' A notion.

' A class could be said as a section of a system application.

' You define all the properties and functions

' Can create subclass

Object

' An object is a representation of a single instance

' An occurrence.

' An object is part of data and a program execution.

' Can't create sub Object

Conclusion

In this task I have explained what is object and what class it describes the difference between them is and clearly explained with suitable examples of what is an object and class.

Task 02

2.1 Draw Class Responsibility Collaboration (CRC) cards keep the complexity of the design at a minimum.

Inroduction

The following task conains all the details of what is a crc card and how it relates to the system and I have drawn all the crc card according to the current system below.

What is CRC?

CRC mean Class Responsibility Collaborator Card. CRC Card is first intruded by Kent Beck and Ward Cunningham. Originally their purpose was to teach the programmers the object oriented paradigm.

CRC is a lightweight approach object oriented analysis technique. Class Responsibility Collaborator modeling frequently includes the users, analysts and developers in a modeling and design process, bringing together the whole development team to form a common understanding of an Object Oriented development project. The technique has since been developed to become valued beyond the education syllabus.

A CRC Card is a collection of stand index cards that are divided into three sections.

1. On the top of the card, Class Name

2. On the left, the Responsibility of the class

3. On the right, Collaboration

The sample collaboration card is given below.

Class Name

Responsibility Collaboration

Class

The Class represents a collection of similar objects. The Objects are things of interest in the system being modeled. They can be a thing, person or thing or any other concept important to the system at hand.

How to Find a Class

' Look for anything that relates with the system, or is part of the system

' Ask yourself 'Is there a customer or client'?

' Follow the money

' Look for reports created by the system

' Look for any screens used in the system

' Instantly prototype interface and report classes

' Look for the three to five main classes right away

' Create a new card for a class instantly

' Use one or two words to describe the class

' Class names must be singular

Responsibility

The Responsibility is whatever that the class does or knows. These responsibilities are the things that the class has knowledge about itself or things the class can do with the knowledge it has. For the example, the person class might have knowledge (responsibility) for its name, address, and contact number.

How to Find Responsibility

' Ask yourself what the class knows?

' Ask yourself what the class does?

' If you have known a responsibility, ask yourself what class it "belongs" to

' Sometimes get responsibilities that we want implement

' Classes will be collaborate to fulfill several their responsibilities

Collaboration

The Collaboration is another class that is used to get information or perform actions for the class at hand. It often works with a particular class to complete a step.

How to Define Collaboration

' Collaboration ensues when the class needs information that it does not have

' Collaboration ensues when the class needs to change information that it does not have

' There will always be at least one initiator of any particular collaboration

' Sometimes that the collaborator does the loose of the work

' Do not pass the responsibility

' The New responsibilities may be made to fulfill the collaboration

Class Responsibility Collaboration (CRC) card

The system manager responsibilities are linked the cities, create rooms, create room type, create hotel, book room, check the available rooms and print the system details. It is collaborating to the city, hotel, room, room type, available room, book room and display system details. The collaboration card is given below.

System Manager

Responsibility Collaboration

' Linked the city

' Create Room

' Create Hotel

' Create Type Room

' Checking available room

' Book Room

' Print System Detail ' City

' Hotel

' Room

' Room type

' Available room

' Book room

' Display System Detail

Table1. 1

The city responsibilities are add city and maintain the city. The city is collaborating to the city, hotel, system manager and display system details. The collaboration card is given below.

City

Responsibility Collaboration

' Add city

' Maintain city ' City

' Hotel

' System Manager

' Display System Detail

Table1. 2

The hotel responsibilities are add hotel and maintain the hotel. The hotel is collaborating to the city, hotel, room, system manager and display system details. The collaboration card is given below.

Hotel

Responsibility Collaboration

' Add hotel

' Maintain Hotel ' City

' Room

' Hotel

' System Manager

' Display System Detail

Table1. 3

The room type responsibilities are create room type and maintain the room type detail. The room type is collaborating to the hotel, room and system manager. The collaboration card is given below.

Room Type

Responsibility Collaboration

' Create Room Type

' Maintain Room type detail

' Hotel

' Room

' System Manager

Table1. 4

The room responsibilities are create room and maintain the room detail. The room is collaborating to the hotel, room type, system manager, book room, available room and display system details. The collaboration card is given below.

Room

Responsibility Collaboration

' Create Room

' Maintain Room detail

' Hotel

' Room Type

' System Manager

' Available Room

' Book Room

' Display System detail

Table1. 5

The book room responsibilities are book room, maintain the booking room and maintain the room details. The book room is collaborating to the hotel, room, room type, available room, system manager and display system details. The collaboration card is given below.

Book Room

Responsibility Collaboration

' Book Room

' Maintain Booking Room

' Maintain Room detail

' Room

' Hotel

' Room Type

' Available Room

' Display System Detail

' System Manager

Table1. 6

The Available room responsibilities are find available room and maintain the room detail. The Available room is collaborating to the hotel, room and system manager. The collaboration card is given below.

Available Room

Responsibility Collaboration

' Find available room

' Maintain Room detail

' Hotel

' Room

' System Manager

Table1. 7

The display system details a responsibility display the system details and its collaborating to the city, hotel, room, room type, available room, book room and system manager. The collaboration card is given below.

Display details

Responsibility Collaboration

' display detail

' City

' Hotel

' Room

' Room Type

' Available Room

' Book Room

' System Manager

Table1.8

Conclusion

According to the task I have clearly explained what is CRC Card and how it is relate to the system. Above I have drawn CRC card for the current system.

2.2 Draw a class diagram which can show the relationship between classes.

Introduction

The following task I have clearly explains about the class diagram and drawn the class diagram for the current system.

What is class diagram?

The Class diagrams are used for a wide variety of needs, including both conceptual or domain modeling and detailed design modeling. The class diagram shows how the different entities communicate to each other. Simply to say the class diagram shows the static structures of the system. The class diagram displays the logical classes and also to show implementation classes. The class is represented on the class diagram as a rectangle with three

Horizontal sections.

For example

Class diagrams show the classes of the system and their interrelationships it is including

' Inheritance

' Aggregation

' Association

' Operations

' Attributes

' Classes

Class Diagram

Conclusion

According to the task I have explained what is class diagram and drawn a class diagram for the current system.

Task 03

3.1 Implement above classes using preferred object oriented programming language.

Introduction

In the question Number 3.1 Implement classes by using object oriented programming language. According to that have explained about the object oriented programing language and implement the each and every class.

City

class city

{

int code;

String cname;

}

class city

{

int code;

String cname;

public static void main (String param[])

{

city c1=new city();

c1.code=001;

c1.cname="Chilaw";

city c2=new city();

c2.code=002;

c2.cname="Negombo";

city C3=new city();

C3.code=003;

C3.cname="Matale";

System.out.println("City code: "+c1.code);

System.out.println("City Name: "+c1.cname);

System.out.println(" ");

System.out.println("City code: "+c2.code);

System.out.println("City Name: "+c2.cname);

System.out.println(" ");

System.out.println("City code: "+C3.code);

System.out.println("City Name: "+C3.cname);

}

}

Hotel

class Hotel

{

int HID;

int code;

String hname;

String cname;

}

class Hotel

{

int HID;

int code;

String hname;

String cname;

public static void main (String param[])

{

Hotel h1=new Hotel();

h1.HID=1;

h1.cname="Chilaw";

h1.hname="Chilaw City";

Hotel h2=new Hotel();

h2.HID=2;

h2.cname="Negombo";

h2.hname="Avendra Garden";

Hotel h3=new Hotel();

h3.HID=3;

h3.cname="Matale";

h3.hname="Lock House";

System.out.println("City Name: "+h1.cname);

System.out.println("Hotel ID: "+h1.HID);

System.out.println("Hotel Name: "+h1.hname);

System.out.println(" ");

System.out.println("City Name: "+h2.cname);

System.out.println("Hotel ID: "+h2.HID);

System.out.println("Hotel Name: "+h2.hname);

System.out.println(" ")

System.out.println("City Name: "+h3.cname);

System.out.println("Hotel ID: "+h3.HID);

System.out.println("Hotel Name: "+h3.hname);

}

}

Room

class Room

{

int rid;

String hname;

String status;

String rtype;

String rname;

String fees;

String condition;

}

class Room

{

int rid;

String hname;

String status;

String rtype;

String rname;

String fees;

String condition;

public static void main (String param[])

{

Room r1=new Room();

r1.hname="Chilaw city";

r1.rid=001;

r1.status="occupied";

r1.rtype="Deulux";

r1.rname="city one";

r1.fees="2000 per day";

r1.condition="A/C";

Room r2=new Room();

r2.hname="Avendra Garden";

r2.rid=002;

r2.status="Vacant";

r2.rtype="Double bed";

r2.rname="Garden two";

r2.fees="1000 per day";

r2.condition="A/C";

Room r3=new Room();

r3.hname="Lock House";

r3.rid=003;

r3.status="occupied";

r3.rtype="Single bed";

r3.rname="House 03";

r3.fees="800 per day";

r3.condition="Non A/C";

System.out.println("Hotel name:"+r1.hname);

System.out.println("Room type:"+r1.rtype);

System.out.println("Room ID:"+r1.rid);

System.out.println("Status:"+r1.status);

System.out.println("Room name:"+r1.rname);

System.out.println("Fees:"+r1.fees);

System.out.println("Room Condition:"+r1.condition);

System.out.println(" ");

System.out.println("Hotel name:"+r2.hname);

System.out.println("Room type:"+r2.rtype);

System.out.println("Room ID:"+r2.rid);

System.out.println("Status:"+r2.status);

System.out.println("Room name:"+r2.rname);

System.out.println("Fees:"+r2.fees);

System.out.println("Room Condition:"+r2.condition);

System.out.println(" ");

System.out.println("Hotel name:"+r3.hname);

System.out.println("Room type:"+r3.rtype);

System.out.println("Room ID:"+r3.rid);

System.out.println("Status:"+r3.status);

System.out.println("Room name:"+r3.rname);

System.out.println("Fees:"+r3.fees);

System.out.println("Room Condition:"+r3.condition);

}

}

Room Type

class Roomtype

{

int tid;

String rtype;

}

class Roomtype

{

int tid;

String rtype;

public static void main (String param[])

{

Roomtype rt1=new Roomtype();

rt1.tid=1;

rt1.rtype="Double bed";

Roomtype rt2=new Roomtype();

rt2.tid=2;

rt2.rtype="Deulux";

Roomtype rt3=new Roomtype();

rt3.tid=3;

rt3.rtype="Single bed";

System.out.println("Room Type ID: "+rt1.tid);

System.out.println("Room type: "+rt1.rtype);

System.out.println(" ");

System.out.println("Room Type ID: "+rt2.tid);

System.out.println("Room type: "+rt2.rtype);

System.out.println(" ");

System.out.println("Room Type ID: "+rt3.tid);

System.out.println("Room type: "+rt3.rtype);

}

}

Available Room

class Availablerooms

{

int rid;

String hname;

String rtype;

String rname;

String cname;

}

class Availablerooms

{

int rid;

String hname;

String rtype;

String rname;

String cname;

public static void main (String param[])

{

Availablerooms ar1=new Availablerooms();

ar1.cname="Negombo";

ar1.hname="Avendra Garden";

ar1.rid=001;

ar1.rtype="Deulux";

ar1.rname="Garden one";

Availablerooms ar2=new Availablerooms();

ar2.cname="chilaw";

ar2.hname="Chilaw city";

ar2.rid=002;

ar2.rtype="Double bed";

ar2.rname="city two";

Availablerooms ar3=new Availablerooms();

ar3.cname="Matale";

ar3.hname="Lock House";

ar3.rid=003;

ar3.rtype="Single bed";

ar3.rname="House 03";

System.out.println("City Name: "+ar1.cname);

System.out.println("Hotel Name: "+ar1.hname);

System.out.println("Available Room ID: "+ar1.rid);

System.out.println("Available rooms type: "+ar1.rtype);

System.out.println("Room name: "+ar1.rname);

System.out.println(" ");

System.out.println("City name: "+ar2.cname);

System.out.println("Hotel name: "+ar2.hname);

System.out.println("Available Room ID: "+ar2.rid);

System.out.println("Available rooms type: "+ar2.rtype);

System.out.println("Room Name: "+ar2.rname);

System.out.println(" ");

System.out.println("City Name: "+ar3.cname);

System.out.println("Hotel Name: "+ar3.hname);

System.out.println("Available Room ID: "+ar3.rid);

System.out.println("Available rooms: "+ar3.rtype);

System.out.println("Room Name: "+ar3.rname);

}

}

Book Rooms

class Bookrooms

{

int rid;

String hname;

String rname;

String cname;

String rtype;

}

class Bookrooms

{

int rid;

String hname;

String rname;

String cname;

String rtype;

public static void main (String param[])

{

Bookrooms br1=new Bookrooms();

br1.cname="Chilaw";

br1.hname="Chilaw City";

br1.rid=001;

br1.rtype="Deulux";

br1.rname="City one";

Bookrooms br2=new Bookrooms();

br2.cname="Negombo";

br2.hname="Avendra Garden";

br2.rid=002;

br2.rtype="Single bed";

br2.rname="Garden two";

Bookrooms br3=new Bookrooms();

br3.cname="Matale";

br3.hname="Lock House";

br3.rid=003;

br3.rtype="Double bed";

br3.rname="House 03";

System.out.println("City Name: "+br1.cname);

System.out.println("Hotel name: "+br1.hname);

System.out.println("Room ID: "+br1.rid);

System.out.println("Available rooms: "+br1.rtype);

System.out.println("Room name: "+br1.rname);

System.out.println(" ");

System.out.println("City Name: "+br2.cname);

System.out.println("Hotel name: "+br2.hname);

System.out.println("Room ID: "+br2.rid);

System.out.println("Available rooms: "+br2.rtype);

System.out.println("Room name: "+br2.rname);

System.out.println(" ");

System.out.println("City Name: "+br3.cname);

System.out.println("Hotel name: "+br3.hname);

System.out.println("Room ID: "+br3.rid);

System.out.println("Available rooms: "+br3.rtype);

System.out.println("Room name: "+br3.rname);

}

}

Display system details

class Displaysystemdetails

{

String cname;

String hname;

String rname;

String rtype;

int HID;

int code;

int rid;

String status;

String fees;

String condition;

}

class Displaysystemdetails

{

String cname;

String hname;

String rname;

String rtype;

int HID;

int code;

int rid;

String status;

String fees;

String condition;

public static void main (String param[])

{

Availablerooms ar1=new Availablerooms();

ar1.cname="Negombo";

ar1.hname="Avendra Garden";

ar1.rname="Garden one";

ar1.rtype="Deulux";

Hotel h1=new Hotel();

h1.HID=1;

h1.cname="Chilaw";

h1.hname="Chilaw City";

Room r3=new Room();

r3.hname="Lock House";

r3.rid=003;

r3.status="occupied";

r3.rtype="Single bed";

r3.rname="House 03";

r3.fees="800 per day";

r3.condition="Non A/C";

System.out.println("City name: "+ar1.cname);

System.out.println("Hotel name: "+ar1.hname);

System.out.println("Room name: "+ar1.rname);

System.out.println("Available rooms: "+ar1.rtype);

System.out.println(" ");

System.out.println("City Name: "+h1.cname);

System.out.println("Hotel ID: "+h1.HID);

System.out.println("Hotel Name: "+h1.hname);

System.out.println(" ");

System.out.println("Hotel name:"+r3.hname);

System.out.println("Room type:"+r3.rtype);

System.out.println("Room ID:"+r3.rid);

System.out.println("Status:"+r3.status);

System.out.println("Room name:"+r3.rname);

System.out.println("Fees:"+r3.fees);

System.out.println("Room Condition:"+r3.condition);

}

}

Conclusion

According to the task I have clearly explained about object oriented programing Language and Implement classes by using Java language.

3.2 Implement a client class with a main (), that calls operations in the Systems Manger class.

Introduction

Following this task I have implement the system manager class by using java language.

Create Hotel

public class createHotel

{

private int HID;

private String hname;

private String cname;

public static void main(String param [])

{

}

public int getHID()

{

return HID;

}

public void setHID(int num)

{

HID = num;

}

public String gethname()

{

return hname;

}

public void sethname(String name)

{

hname = name;

}

public String getcname()

{

return cname;

}

public void setcname(String name)

{

cname = name;

}

}

Create Room

public class createRoom

{

private int rid;

private String hname;

private String status;

private String rtype;

private String rname;

private String fees;

private String condition;

public static void main(String param [])

{

}

public int getrid()

{

return rid;

}

public void setrid(int num)

{

rid = num;

}

public String gethname()

{

return hname;

}

public void sethname(String name)

{

hname = name;

}

public String getstatus()

{

return status;

}

public void setstatus(String name)

{

status = name;

}

public String getrtype()

{

return rtype;

}

public void setrtype(String name)

{

rtype = name;

}

public String getrname()

{

return rname;

}

public void setrname(String name)

{

rname = name;

}

public String getfees()

{

return fees;

}

public void setfees(String name)

{

fees = name;

}

public String getcondition()

{

return condition;

}

public void setcondition(String name)

{

condition = name;

}

}

Create Room Type

public class createRoomType

{

private int tid;

private String rtype;

public static void main(String param [])

{

}

public int gettid()

{

return tid;

}

public void settid(int num)

{

tid = num;

}

public String getrtype()

{

return rtype;

}

public void setrtype(String name)

{

rtype = name;

}

}

Display System Details

public class DisplaySystemDetails

{

public static void main(String[] args)

{

createHotel CH = new createHotel();

CH.setHID(10);

CH.sethname("Chilaw City");

CH.setcname("Chilaw");

System.out.print("Hotel ID ");

System.out.println(CH.getHID());

System.out.print("Hotel Name ");

System.out.println(CH.gethname());

System.out.print("City Name ");

System.out.println(CH.getcname());

System.out.println("");

createRoom CR = new createRoom();

CR.setrid(010);

CR.sethname("Avendra Garden");

CR.setstatus("occupied");

CR.setrtype("Deulux");

CR.setrname("city ten");

CR.setfees("Rs.2000.00");

CR.setcondition("A/C");

System.out.print("Room ID ");

System.out.println(CR.getrid());

System.out.print("Hotel Name ");

System.out.println(CR.gethname());

System.out.print("Status");

System.out.println(CR.getstatus());

System.out.print("Room Type ");

System.out.println(CR.getrtype());

System.out.print("Room Name ");

System.out.println(CR.getrname());

System.out.print("Fees");

System.out.println(CR.getfees());

System.out.print("condition ");

System.out.println(CR.getcondition());

System.out.println("");

createRoomType CRT = new createRoomType();

CRT.settid(1);

CRT.setrtype("Single Bed");

System.out.print("Room Type ID");

System.out.println(CRT.gettid());

System.out.print("Room Type");

System.out.println(CRT.gettid());

System.out.println("");

}

}

Conclusion

According to this task I have implement the system manager main class by using java programing language

Task 04

4.1 Test implemented object oriented solution by using test mechanisms (valid declarations, debugging code, and comment code) and types (range testing, input testing, load testing, and system compatibility).

Introduction

Following this task contains about object oriented test mechanisms and types. I have clearly explained about them below.

Valid declarations

The variable delivers with the named storage that programs can operate. In Java Each Variable has a specific type. This controls the layout and size of the variable's memory. The range of values stored within that memory and the set of processes that can be applied to the variable. Before compile the program first complier must declare the all variables. In java program language the variables are dived into three types.

' Local variables

' Instance variables

' Class/static variables

Example for variable declaration.

class city

{

int code;

String cname;

public static void main (String param[])

{

city c1=new city();

c1.code=001;

c1.cname="Chilaw";

System.out.println("City code: "+c1.code);

System.out.println("City Name: "+c1.cname);

Some variable types that are using in java programing language

' char

' byte

' int

' unsigned int

' long

' unsigned long

' float

' double

Debugging code

Debugging is the method of engineering hard ware device or locating and fixing errors in computer program code. To debug the hardware device or program is to begin with the problem and separate the source of problem, after that fix it. The user does not know how to fix the problem the user must learn about the problem to be able to escape it until it is permanently fixed. Debugging is a required method in almost any new hardware or software development method. The debugging is done as the result of the small unit test of the system. The most computer programs and many programmed hardware devices cover thousands of lines of code. The Debugging tools are called as debuggers. It is helping identify coding errors at the different development phases.

Comment code

When a runtime error occurs, the computer stops the execution of program and displays an error message.

The comment codes are used to understand any programming language. There are there types of comment codes.

1. Java Single line comments or end line comment or slash-slash comment (//...)

2. Java Multi line or traditional comments (/*'*/)

3. JavaDoc or java documentation comment (/**'*/)

These comments are usable in the wisdom that they make the programmer feel suitable to grasp the logic of the program. The Java compiler does not include them in final executable. So, you can insert as many Java comments as you want until they are proven to be useful. As above three styles of comments Java supports. Even though all the comments which are ignored by the complier these comments are used in order for the programmer to understand it. These comments include information about the programed code, such as how it works or how the program could be modified.

1. Single line comments

In a java program any lines in that start with the (//...) symbols are known as comments. The Comments are ignored during the program runs, but they were useful when reading a program, because they give information about the program. The single line comments are always used at top of the program to give information about the purpose of the program. But also used in the body of the program to explain parts of the program which part may be difficult for the reader to understand. The single line Comments may be added to the end of any declaration in the Java program by typing the (//...) symbols.

2. Multi-line comments

The Multi-line comments are useful to "comment out" the block of declarations. Convert the statement into comment it is called as Commenting out. It is Different to deleting a statement. Convert the line into the comment, simply type // at the beginning of the line. If change several lines to into comments, you can place a // at the start of each line. Another way to covert lines of the program files into comment. It is block of statements that starts with the characters /*''..*/ java compiler ignored those lines.

3. Javadoc comments

The Javadoc comments are used to document new classes you create as a programmer i.e. provides information about the class for users of the class to read. Until begin to create the new Java classes, use the first two methods shown above to document Java programs. At the top of the source code, deliver the comment block which starts with the characters /** '''*/. Those lines will be ignored on program implementation, but it will be removed into the html file of useful documentation for the program class after using a program javadoc.exe.javadoc.exe is involved in the Java installation.

Range Testing

The range is a simple developed in the analysis of the real program. The range test determines the real-world RF range of the XBee embedded elements in the Drop in the Networking Specialized Development Kit. According to this range test useful to planning and developing a network.

Following equipment's are used in the range test

' PC

' USB interface board, connected to the PC via the USB cable

' Digi gateway

Input Testing

Input testing is software testing technique which using the random data is given as the inputs to the system. If the application fails, the system identifies those problems or faults. In short, unexpected or random inputs might be lead to the unexpected results. The input test is including these characters:

' Input Number or Character

' Input Application

' Input Protocol

' Input File Format

Load Testing

The Load testing is software testing which is shown to understand the behavior of the application under a particular expected load. Load testing is a type of non-Functional testing. The Load testing is the method of subjecting a computer server, peripheral application or network to the work level approaching the limits of its specifications. This testing can be done through the under control lab conditions to correctly measure the capabilities of a single system or relate the capacity of different system. The Load testing contains simulating real-world user load for the goal application. It helps to determine how the application behaves when the multiple users are hits it simultaneously. This test is performing to determine the system's behavior in both peak and normal condition. The main goal of a load testing is to identify the maximum number of work the system can be handle without important performance degradation. The some process of load testing:

' Downloading the series of large files from the internet.

' Running multiple applications on a server or computer simultaneously.

' Allocating many jobs to a printer in a line.

' Exposing the server to a large number of traffic.

' Writing and reading the data from the hard disk continuously.

System compatibility

The system compatibility is a nonfunctional testing showed on the application to evaluate the applications in different environments such as website brows with different browsers and hardware platforms. The system Compatibility testing should be performed manually or it can be determined by an automated functional. The system compatibility is dived in to two types- Backward and forward compatibility testing.

' Operating system Compatibility Testing - Linux , Mac OS, Windows

' Database Compatibility Testing - Oracle SQL Server

' Browser Compatibility Testing - IE , Chrome, Firefox

' Other System Software - Web server, networking/ messaging tool, etc.

Test plan for the system

Test No expected Result Actual Result

001 Create City Create city and all data add to the table Data update to the table Success

002 Create Hotel Create hotel and all data add to the table Data update to the table Success

003 Create Room Create Room and all data add to the table Data update to the table Success

004 Crate Room Type Create Room Type and all data add to the table Data update to the table Success

005 Book Room Book room and all data add to the table Data update to the table Success

006 Find available Room Search available rooms Show available Success

007 Display Details Show details View details Success

Conclusion

In this task I have explained about valid declarations, debugging code, and comment code and types range testing, input testing, load testing, and system compatibility

4.2 Error handling during software testing and give a feedback to improve the developed object oriented solution. (Provide Suitable Screenshots)

Introduction

Following this task clearly explained about software testing, testing types and error handling with suitable Screenshots examples.

Error Handling

The Error handling refers to the detection, resolution and anticipation of communications programming, and application errors. In the programming, the development error is one that can be prevented.

Why the error handling is need for the testing

The Error testing should be occurring through the software development life cycle.in the developmental method the impact from errors should be known and right action taken to reduce those errors to an acceptable level. The Error Handling testing supports in the error management method of software development and maintenance.

1. Define the all reasonably expected error conditions are recognizable by the application system.

2. To show the Occurred errors and store the error for the future upgraded.

3. Define the accountability for processing errors has been allocated and that the procedures offer a high probability that the error will be well corrected.

4. To Avoid the Application Crashes

5. Define that reasonable control is maintained over the errors during the correction method.

According to the testing there different type of errors;

1. Syntax errors: the errors due to the statement that the syntax of the language is not respected.

2. Semantic errors: the errors due to an incorrect use of program declarations.

3. Logical errors: the errors due to the statement that the specification is not respected.

4. Runtime errors: logical errors and dynamic semantic errors, which cannot be detected by the debugging.

5. Compile time errors: the syntax errors and static semantic errors are indicated by the compiler.

Syntax Errors

A set of grammatical rules of the programming language for writing statements of the computer program is known as syntax of the language. The Syntax errors are actual errors are not followed in writing the source code that prevent it from actually compiling. The compile reports a proper error message about the errors. A compiler can't compile the program that contains syntax errors. The syntax errors are easy to identify and remove. The syntax errors are similar to semantic errors because it can be begun by typing something wrong, but these can be hard to spot.

Some examples are given below.

' Missing Capitalization and missing spellings

' Missing Semicolons (;) at the end of the statement

' Using variables without Variable Declaration

' Missing delimiters and etc.

These errors happen because of wrongly typed statements. For example, if don't place a semi-colon after the statement it results is a syntax error.

Semantic Errors

The semantic errors are the calmest to spot because the compiler will list down the line number and even the word that is initiating the problem. It also gives a good explanation of what's going on. Another kind of semantic error is not declaring an object correctly. So according to that if run into this problem one of the best ways to resolve this is check the documentation and find out what the constructor has to say.

Logical Errors

Logical Error means the errors in the logic of the program are called as logical error. Logic errors always have been the most difficult errors to separate. The Logic errors don't return correct error messages and don't stop execution of the program.

' The sequence of instructions used in a program may be incorrect.

' The mathematical formulas used in program instructions may be incorrect etc.

When the logic error follows the program performs to be functioning normally. It is only over rigorous testing the programmer fixed the logic errors before creating the problem for the end user. Sometimes the problems are perform immediately but most of the time the problems are not found until after the statement. The logical errors are difficult to detect. It can only be detected by examining all the units of the program through one by one. It is time consuming and lengthy process. Logical errors are the output errors of the program. The existence of logical errors leads to undesired or incorrect output and are caused due to error in the logic applied in the program to produce the desired output.

The logical errors are couldn't be detected by the compiler. The programmers have to check the entire coding of the program line by line. These errors are occurring because of logically incorrect instructions in the program.

Runtime Errors

The Runtime error means the errors that occur during the execution of program are called the runtime errors. The runtime errors are once a program has been passed or the statement has completed over the interpreter without the syntax errors, the program have been available for the execution. During the execution the resource is accessed or value is processed in an inconsistent manner, the program stops execution and aborts with the runtime error. Some runtime errors are given below.

' The program tries to perform an illegal operation such as dividing a number by zero.

' If input data given to the program input data file is not found in the specified path or is not in the correct format.

' If hardware problem happens such as hard disk full, or disk error or printer error or etc.

When the computer programs can't execute the program statements they will cancel with a runtime error. If the runtime error is not managed as an exception, the program will be needed to restart from the beginning.

Exception Handling

The exception is a problem that rises during the execution of the program. The exception can be occurring for so many different reasons, some reasons are given below.

' The user has been entered invalid data.

' The file that required to be opened but it cannot be found.

' The network connection has been lost in the during the communications

Checked exceptions: the checked exception is the exception that is usually a user error or a problem that the programmer cannot be seen.

Runtime exceptions: the Runtime exception is an exception that the programmer avoid ensues that possibly.

Errors: These are not exceptions at all, but the problems that rise outside the control of the programmer or the user.

Exception Hierarchy

All the exception classes are subtypes of the java.lang.Exception class. According to the exception class there is a subclass of the Throw able class. And another subclass called as Error which is derived from the Throw able class. The Errors are not generally trapped form the Java programs. These conditions are generally happening in case of severe failures are not handled by the java programs. The runtime environments Errors are generated to indicate errors.

Figure

According to the Exception there are three type of Exception. Those exceptions are given below.

' Try/ catch ' the process catches an exception using the combination of the try and catch keywords. The try/catch block is placed around the code that might be generating an exception. The Code within the try/catch block is mentioned to as protected code.

' Throw- that the method does not handle the checked exception, the process must be declaring it using the throws keyword. The throws keyword seems at the end of a process's signature.

' Finally - The finally keyword is used to create the block of code that follows the try block. The finally block of code always executes, whether or not an exception has ensued. Using the finally block consents to run any cleanup-type statements that want to be execute, no problem what happens in the protected code.

Conclusion

In this task clearly explained about error handling and software testing with testing types with suitable Screenshots examples.

4.3 Include simple help menu to assist clients.

Introduction

In this task explained about the help menu features including with suitable screen capture.

Help Menu

Help menu is an option which is delivery in to the system by the programmer to make the system much easier to the end-user. The help menu contains some of the following such as

' Content

' Index

' Search

' Offline Help

' System Help

' Feedback

' About

Small description for the help menu entry

Content - this content is useful for the user to launch the local help system and display this manual. And also user can search the information through the topic wise.

Index ' index helps the user to find any details which there are looking for easily since its sorts out data's using keyword

Search- the search is help to the users for searching information by using keywords. Otherwise they search whole documentation products. So it is very useful to the users.

Offline Help ' from the offline help the user can get help from the system and solve the program through the offline.

Online Help ' the online help is help to the user to identify the problem and get solution through the websites.

Feedback - at the feedback the user can write about the system benefits and problems.

About- in the about tab include about the system history and support packages and the revisions

Conclusion

According to this task Cleary explained about the help menu with suitable screen shots.

4.4 Create technical documentation to include designs, delivery system, platform, environment, file structures, coding, constraints, and maintenance requirements.

Introduction

Following this task I have explained about technical documentation and designs, delivery system, platform, environment, file structures, coding, constraints, and maintenance requirements.

What is Technical Documentation?

The Technical documentation is the common period for documentation with is regard to the product. The People mostly associate the period with the documents and information that are passed on to the public by the manufacturer:

' Installation manual

' User instruction

' Operating instruction

' Software manual

' Servicing instruction

The technical documentation mentions to the different documents with product-related information and data that are used and stored for different needs.

System Design

The System design is the method of defining the modules, architecture, interface, components, and data for a system to fulfill specified wants. And also defining and developing systems to the user In this system design there are two main basic design methods:

' Logical design

' Physical design

Logical design

The Logical design is the graphical representation of a system showing the system's processes and the flows of the data into and out of the processes. The Logical design use to document information systems. To represent the logical design of the system can use different types of diagrams such as

' ERD

' Class Diagram

' Activity Diagram

' Data Flow Diagram

' UML Diagram etc

Physical Design

The physical design communicates to the real input and output processes of the system. This is put down in terms of how data is given as an input into the system, how it is genuine, how it is handled, and how it is displayed as the output. The physical design dived into three types they are:

1. User Interface Design

2. Data Design

3. Process Design

Delivery system

Delivery system is the method program of getting ready for the end-user. A newly created program is worked fine on the computer. But doesn't mean it is ready for other type of users. There are many extra program features probably had not wanted. But it should to offer if the program will be used by others. These types of features are required to make the program more user kindly help to protect the program from the piracy.

Considering adding following those features can make the program ready for other use.

' Help documentation

' Trial version

' Executable file

' License agreement

' Icon library

' Code complication

' Install wizard

' Uninstall program

Platform

In this computer world currently there are many types of platforms, such as

' Microsoft Windows

' Macintosh,

' OS/2

' UNIX

' NetWare??

The software must be compiling desperately to run on each platform. The Java Platform is the new software platform for delivering and running highly collaborating, dynamic, and protected applets and applications on the networked computer systems. The java platform apart is that is sits on the top of other types of platforms and compile to the byte code. The java platform is built in security, automatic garbage collection and exception handling. The compilers are present to speed up the execution by converting java byte code into machine language.

The java platform has dived into two basic parts

1. Java Virtual Machine

2. Java Application Programming Interface (Java API)

Environment

The environment means a collection of software and hardware tools. The software system is used by developer. There are two types of environment.

1. Programing environment

2. Software development environment

The programing environment means the environment that only support for the coding stage of the software development cycle. And the software development environment mean the environment that extends or automates the activities include the software development cycle. The programs in the large scale task such as configuration management, project and team management.

The categorization includes four categories each and every representing style has an important effect environment on their architecture, user interface and tools. The categories are given below.

1. Language-centered environments

2. Structure-oriented environments

3. Toolkit environments

4. Method-based environments

File structures

The File Structures is the collection of Data stored in Secondary Storage Device. The structure allows the application to read, modify and write the data and also support to find out the data. The File Structure is a mixture of representations for data in files and of operations for opening the data. There are three types of file structures;

1. Sequential files

2. Indexed files

3. Hashed files

Coding

In this phase the programmer convert the system design into a computing language where the user and the computer will be able to understand. Following are some of the object oriented programing languages

' java

' c

' c++

' VB.Net

' ASP.Net

' PHP

I have used java programing language for develop the system. The java language programing code is like this.

class Displaysystemdetails

{

String cname;

String hname;

String rname;

String rtype;

int HID;

int code;

int rid;

String status;

String fees;

String condition;

}

Constraints

Maintenance requirements

Maintaining the system is an important aspect of SDLC. The key the personal change positions in the organization. In this stage the whole system checks if it covers the customer requirements. This is a repairing part of the system.

Maintenance stage usually consists of.

' Corrective maintenance putting right thing. Many errors that remain in the system. This can be either a coding or designing or requirement error.

' Perfective maintains improve the system so that it meet when needs of e business better.

' Adaptive maintains handle changes that are needed because of the organization or perhaps legislation has change.

Conclusion

In this task I have explained about the technical documentation and the designs, delivery system, platform, environment, file structures, coding, constraints, and maintenance requirements.

Source: Essay UK - http://doghouse.net/free-essays/information-technology/characteristics-object-oriented-programming.php


Not what you're looking for?

Search:


About this resource

This Information Technology essay was submitted to us by a student in order to help you with your studies.


Rating:

Rating  
No ratings yet!


Word count:

This page has approximately words.


Share:


Cite:

If you use part of this page in your own work, you need to provide a citation, as follows:

Essay UK, Main Characteristics And Features Of Object Oriented Programming. Available from: <http://doghouse.net/free-essays/information-technology/characteristics-object-oriented-programming.php> [22-02-19].


More information:

If you are the original author of this content and no longer wish to have it published on our website then please click on the link below to request removal:


Essay and dissertation help

badges