Académique Documents
Professionnel Documents
Culture Documents
CONCEPT
Assignment
MR ROZAN FARHAN
M R R FARHAN Programming
Concept
CONTENTS
Acknowledgement …………………………………… 1
Task 1
Task 1.1………………………………………………… 3-5
Task 1.2………………………………………………… 6 - 10
Task 1.3………………………………………………… 8-9
Task 2
Task 2.1………………………………………………… 11
Task 2.2………………………………………………… 11
Task 3
Task 3.1………………………………………………… 12-29
Task 3.2………………………………………………… 30
Task 4
Task 4.1………………………………………………… 31-34
Task 4.2………………………………………………… 35
Task 4.3………………………………………………… 36-37
Task 4.4………………………………………………… 38-40
Task 4.5………………………………………………… 41-42
Task 5
Task 5.1…………………………………………………
Task5.2…………………………………………………
Task5.3…………………………………………………
Reference
HND23 2
M R R FARHAN Programming
Concept
Acknowledgement
First, I feel very proud and great pleasure to thank my lecturer Mr. I.Iynharan
for helping me to understand this subject, understand problems which are in
this scenario and guided me to complete this assignment alone.
Thank you
HND23 3
M R R FARHAN Programming
Concept
Task 1.1
Data Storage
The Number of Instructions and amount of data a Computer can Store in its
memory is measured in bytes and System. Memory (or main store) is the
name giving to the group of chip inside the processing unit where data is held
temporarily whilst processing takes place .The data help in the memory is
insanity available to the computer. Unlike backing storing which has to be
accessed on disk or taps. These databases behaves like ordinary dictionaries,
with the exception that you can only
Use strings for keys and values
Now, out of all your thousands of empty cardboard boxes two of them contain
pieces of paper with numbers on them. To help you remember which of the
thousands of boxes hold your numbers, put a sticky label on each of the two
boxes. Write "number1" on the first sticky label, and "number2" on the second
label.
What have we just done? Well, we've created a large memory area (the room
and the cardboard boxes), and we've set up two of the boxes to hold our
numbers (two variables). We've also given each of these variables a name
(the sticky labels) so that we can remember where they are
So far you've been using variables quite a lot. You've put numbers into
variables, and you've put text into variables. But you've only done this one at
a time: you've put one number into a variable, or one string of text. You've
been doing this:
HND23 4
M R R FARHAN Programming
Concept
Variable
Because of this
• Array
HND23 5
M R R FARHAN Programming
Concept
• Advantage of array
• Disadvantage of array
Java is slower than C. When interpreted, Java is about 10 times slower. When
compiled by a just-in-time compiler, Java is about 2 times slower. Experts
predict that standard Java will soon be nearly as fast as C or C++, but
probably never as fast as FORTRAN. Java's run time resolution of all method
that are not declared final and its array bound checks for indexing operations
are probably the two features that hurt Jest's performance most. However, we
have not yet investigated Jest's performance systematically.
• Some information
Example
1.” Name” then I had entered 1 number then it will give name
As well as 2” age “then I had entered 2 number then it will give age
Al so we can realize this computerized system in (previous customer
information)
2. Time serving
HND23 6
M R R FARHAN Programming
Concept
Task 1.2
1. Encapsulation
2. Inheritance
3. Polymorphism
And is the mechanism that binds together code and the data manipulates
• For Example
We are going to make car here car is a object but car parts and others
method
Example (oop)
HND23 7
M R R FARHAN Programming
Concept
• Structure programming
structure programming we are using iteration namely (this in its simplest form
uses two values of variable, the starting and final condition for the action .the
variable is incremented on each iteration until it reaches the value identified
as the final state. structure programming we are using diagram to identify
relationship between the components of the structure and to get some idea for
developed the programmer in structure programming we can use any
languages
Structures programming three type of instruction are used such as (sequence.
selection and iteration) structure programming program order most
importance as structure programmer we ca not use Key word and structure
programmed.
For simple structure programs you often follow these steps which are shown
below.
HND23 8
M R R FARHAN Programming
Concept
It’s worth noting, at this point, that most OOP languages (such as C++ or
Java) are tasteful where as often procedural programming languages are
stateless.
But don’t just take my word on this; try it for yourself! To better help you to do
that, I’m going to follow up this introduction to object-oriented programming
with tutorials on its use within JavaScript and PHP.
So in closing, I hope you’ve learnt something new from this overview. Please
feel free to post comments and questions and I’ll Endeavour to reply to the
best of my ability.
Inheritance
Inheritance is the ability to apply another class's interface and code to your
own class. Remember, with polymorphism, you got the interface; however,
you must apply your own code. The power of inheritance is the ability to
inherit code, saving developer’s time. This type of inheritance is called
implementation inheritance. To inherit another class, use the Inherits keyword.
In the domain manager’s pattern, objects are inherited from a base class
called Domain Object. This means that every object in the system, whether it
is a student, teacher, building, address, or any other object type a system
requires will return true if asked if it is a Domain Object. The power of this
type of inheritance is that it allows us to design generic functions that take an
object of the type Domain Object and route them appropriately to specialized
code to deal with them. This is used in the Domain Manager's call to the data
layer
HND23 9
M R R FARHAN Programming
Concept
• Encapsulation
The object oriented programming will give the impression very unnatural to a
programmer with a lot of procedural programming experience. In Object
Oriented programming Encapsulation is the first pace. Encapsulation is the
procedure of covering up of data and functions into a single unit (called class).
An encapsulated object is often called and the need of encapsulation is to
protect or prevent the code (data) from accidental corruption due to the silly
little errors that we are all prone to make. In Object oriented programming
data is treated as a critical element in the program development and data is
packed closely to the functions that operate on it and protects it from
accidental modification from outside functions. Encapsulation provides a way
to protect data from accidental corruption. Rather than defining the data in the
form of public, we can declare those fields as private. The Private data are
manipulated indirectly by two ways. Let us see some example programs in C#
to demonstrate Encapsulation by those two methods. The first method is
using a pair of conventional accessory and matador methods. Another one
method is using a named property. Whatever be the method our aim is to use
the data with out any damage or change. Abstract data type in this article let
us see about it in a detailed manner.
• Polymorphism
HND23 10
M R R FARHAN Programming
Concept
• Overloading
• Overriding
HND23 11
M R R FARHAN Programming
Concept
Task 2
• We can save the time and money this will be very usefully
HND23 12
M R R FARHAN Programming
Concept
Task 3.1
FLOW CHART
User Logging
HND23 13
M R R FARHAN Programming
Concept
Start
User_Name
User_Pass
Sysuser
Input : User_Name
Message
Invalid Usre
Enter : User Password
Input : User_Pass
T If Sysuser F
=Usre_Name,Usre_Pass
Boolean
Display
JOHNSON & SON
• Customer Details
Stop
Add Customer
HND23 14
M R R FARHAN Programming
Concept
Start
Auto Number
Input cusCode
Input cusName
Input cusAdd
F
If T
errorcusTele=
cusTele
HND23 15
M R R FARHAN Programming
Concept
Input cusTele
F
Input
Message cuscrAmount
Invalid
Format
If
errorcusTele=
cusTele
Out Put
cusName=null; cusAdds=null;
con=null;cuDate;crAmount=0; cusCode=0;
cusTele=0;errorcusTele ; errorcrAmount
Display
!!!!!Recode Successfully Saved!!!!!
Stop
HND23 16
M R R FARHAN Programming
Concept
Customer Edit
Start
Input cusName
If
errorcusTele =
cusTele
Input cusAdd
Display
Display “Enter
“Enter Customer
Customer Address”No”
Telephone
Input cusTele
Output
cusName ,cusAddress ,cusTelePhone
Stop
HND23 17
M R R FARHAN Programming
Concept
Customer Delete
Start
cusName=null;
Message
Input cusName Invalid
Name
If
errorcusTele=
cusTele
Deletd
Stop
HND23 18
M R R FARHAN Programming
Concept
Customer
Search
Start
cusName,SecCust
Input cusName
If cuName=SecCust F
T
Message
Invalid
Name
Display
cusName,cusAddres,cusTele,cus
crAmount
Stop
HND23 19
M R R FARHAN Programming
Concept
Damage Details
Add Damage
Start
Boolean
Input itCode
If itCode=erroritCode
T
Display “Enter The Damage Item
Input DamQuan
Output
itCode,DamQuan
Stop
HND23 20
M R R FARHAN Programming
Concept
Edit damage
Start
Input itCode
If itCode=erroritCode
T
Display “Enter The Damage Item
Input DamQuan
Output
itCode,DamQuan
Stop
HND23 21
M R R FARHAN Programming
Concept
Item Details
Item Details
Start
Display
Model,Des, cusName;
itCode,unPrice,stHand,
Stop
HND23 22
M R R FARHAN Programming
Concept
Search Item
Start
Input Des
If itCode=erroritCode F
T
Message
Invalid
Format
Display
Model,Des, cusName;
itCode,unPrice,stHand,
Stop
HND23 23
M R R FARHAN Programming
Concept
Sales Details
Start
Input salCode
Input cusType
If If
cusType=Reg cusType=Non
Input cusName
F
Search If
cusName=Se
cCust
T
A
HND23 24
M R R FARHAN Programming
Concept
Inp ut itC o de
If itC ode
=SysgetIt
Inp ut u nP rice
If N um ber
F orm at
In p ut qty
If N um ber
F orm at
HND23 25
M R R FARHAN Programming
Concept
S
D
If (Answer. equals(“Yes”))
Input
saDate
Calculate Subtotal
[y]=qty[y]*UnPrice[y];
Calculate totalprice
=(totalprice+Subtotal[q]
HND23 26
M R R FARHAN Programming
Concept
if(to ta lpric>2
e 50 0 0)
els e d is=1 0;
if(to talp ric>1
e 5 00 0)
e ls e d is=7;
if(tota lp ric>80
e 0 0)
d is=2; d is=4;
N on d is=1 0;
e ls e
if(to ta lpric>1e 50 0 0) d is=8;
e ls e
d is=5;
if(tota lp ric>80
e 0 0)
d is=1; d is=3;
HND23 27
M R R FARHAN Programming
Concept
F F
D is p la y “E n te r P a y m e n t T y p e ”
In p u t
pay
T T
T
I f p a=y
I f p a=C
y heque If p a=C
y r e d it
C as h
D is p la y “E n t e r C h e q u e
D is p la y “E n t e r T h e A m o u n t ” D is p la y “E n t e r C re d it N u m b e r”
N u m b e r”
In pu t A m o un t In p u t Input
C heN um C re d N u m b
C a lc u la t: eb la n c=A
h m o u-F
n t a; D is p la y “E n t e r B a n k N a m e D is p la y “E n t e r B a n k N a m e
HND23 28
M R R FARHAN Programming
Concept
O u tp u t
s a l e C o,cd ue s T y ,c
p eu s N a m,i tCe o d, e
U n P ric,qety,to ta lp ric,d ei s c o u,fa,s
n t a D a te F in a l
A m o u,Fn tin a l A m o,Du nistc o u,Tn ot ta l A m o u n t
D ra w L in
D is p la y
s a l e C o,cd ue s T y ,c
p eu s N a m,itC
e o e U n P,qricty,to
e ta lp
ric e,d is c o u,fa,s
n t a D a te F i n a l A m
,F oinuanl t
A m o u,Dn tis c o u,Tn ot ta l A m o u n t
D ra w L in
D is p la y “D o y o u L ik
......
e ?C( Yo eu s/N o)”
In p u t A n s w e r
If (A n s w .eerq u a ls
(“Y e s))”
S to p
HND23 29
M R R FARHAN Programming
Concept
Purchase Details
Start
SyspSppl=null;
Quantity=0,SubTotal=0,uPrice=0,itCode=0,purCode=0
Amount=0,Balnce=0,Stock=0,SyspSppl,SysitCode
Input purCode
Message
Invalid
Format
Input SyspSppl
T Boolean
F
If SyspSppl =SyspSppl
Input itCode
Message
Invalid
Format
F
If SysitCode=itCode
A oolean
HND23 30
M R R FARHAN Programming
Concept
Message
Input Quantity Invalid
Format
Boolean
If errorQuantity =Quantity F
Input payMend
Input puDate
Calculate :
“SubTotal=Quantity*uPrice”
Out Put
SyspSppl;Quantity,
SubTotal,uPrice,itCode,purCode
Amount,Balnce,Stock
Display
SyspSppl,Quantit, SubTotal,
uPrice,itCode,purCode,
Amount,Balnce,Stock
!!!!! Recode Successfully Saved!!!!!
Stop
HND23 31
M R R FARHAN Programming
Concept
Task 3.2
The Trading House
• Creating Console
String key=null;
try {
System.out.print ("\n");
Key=obj.readLine ();
System.out.println ();
} catch (Exception e) {
System.out.println ("Error:"+e);
}
return key;
HND23 32
M R R FARHAN Programming
Concept
Task 4.1
Sales
Sales : Subtotal[y] =qty[y]*UnPrice[y];
Item Stock : Blanca=Stock[y]-qty[y];
Blanca : blanch=Amount-Fa;
Discount : discount= (totalprice*dis/100);
Final Amount : Fa= (totalprice-discount);
Purchase
• The array
Continue to do {
con=obj.readLine();
HND23 33
M R R FARHAN Programming
Concept
cobj.DrawLine (fline);
System.out.println (" ");
System.out.println ("\t\t\t\Johnson & SON PVT LTD.\t\t\t\t\t");
System.out.println ("\t\t\t\t123 Galley Road");
System.out.println ("\t\t\t\Colombo 3");
System.out.println (" ");
cobj.DrawLine (fline);
HND23 34
M R R FARHAN Programming
Concept
if (cusType=="reg")
else if(totalprice>8000)
dis=4;
else
dis=2;
{
}
else
if (totalprice>25000)
dis=8;
else if(totalprice>15000)
dis=5;
else if(totalprice>8000)
dis=3;
else
dis=1;
}
HND23 35
M R R FARHAN Programming
Concept
Char sline='|';
cobj.DrawLine (sline);
cobj.DrawLine (fline);
cobj.DrawLine (fline);
System.out.println ("\n");
System.out.println ("\t\t\t JOHNSON & SON INTRENATIONL PVT.LTD
");
System.out.println ("\t\t\t\t 123, GALLEY ROAD ");
System.out.println ("\t\t\t\t COLOMBO 2");
System.out.println ("\n");
System.out.println ("\t Tel No: 0117211501");
System.out.println ("\t Fax No: 0117211502");
System.out.println ("\t Web Sit: www.johnson.com");
System.out.println ("\n");
cobj.DrawLine (fline);
cobj.DrawLine (fline);
HND23 36
M R R FARHAN Programming
Concept
Task 4.2
Example Coding:
try {
do {
• Again use the try part to make an error for the number
try {
Inbox=true;
qty[y]=Integer.parseInt(obj.readLine())
HND23 37
M R R FARHAN Programming
Concept
} while (index==false);
Task 4.3
The coding for the login
import java.io.Console;
String user="admin";
String password="123456";
Boolean Sysuser=true;
try{
do{
HND23 38
M R R FARHAN Programming
Concept
While ((User_Name.equals(User_Name)==false)||
(User_Pass.equals(User_Pass) ==false));
• That User Name and Password true Connecting the Get Key
Class
System.out.println("\n");
obj.DrawLine(fline);
}
}
HND23 39
M R R FARHAN Programming
Concept
Task 4.4
Assigning Values
Example:
• Customer Code :
cusCode =” 1”;
cusCode =” 2”;
cusCode =” 3”;
cusCode =” 4”;
cusCode =” 5”;
cusCode =” 6”;
• Customer Name:
cusName = “Farhan”;
cusName = “Rozan”;
cusName = “Faizan”;
cusName = “Muhaz”;
cusName = “Ragavan”;
cusName = “Shopz”;
crAmount =”25000”;
crAmount =”25000”;
crAmount =”30000”;
crAmount =”28000”;
crAmount =”25000”;
HND23 40
M R R FARHAN Programming
Concept
crAmount =”25000”;
Boolean errorcusTele=false;
Boolean errorcrAmount=false;
try{
do{
try{
errorcusTele=false;
}
catch (NumberFormatException ex)
{
System.out.println("\n");
HND23 41
M R R FARHAN Programming
Concept
errorcusTele=true;
}
}while(errorcusTele==true);
do{
try{
cuDate=day+"-"+(month+1)+"-"+year;
System.out.println ("\t\tDate[DD.MM.YYYY] \t: "+cuDate);
HND23 42
M R R FARHAN Programming
Concept
Task 4.5
Customer Details
Purchase Details
Sea = Search The What Item You Purchase all Details [ Sea
]
HND23 43
M R R FARHAN Programming
Concept
Sales Details
Damage Details
Administrator
HND23 44
M R R FARHAN Programming
Concept
Task 5.1
What Is Java?
• JSP :
Like PHP and ASP. Java server pages based on a code with
normal HTML tags, which helps in creating dynamic web pages.
• Java Applets :
This is used within a web page to add new features to a web
browser.
HND23 45
M R R FARHAN Programming
Concept
• Java Beans :
This is like visual basic and reusable software component that
can be easily assemble to create new and advanced application.
• Bin directory :-
The bin directory provides all inessential tools for developing
and testing the program through the help of command provided
by java compiler.
• Demo directory:-
This application consists many applications and applets with
source code.
• Include directory :-
It contains all header files like for ‘C’ programming language that
enables you to combine C code into a java program.
• Lib directory :-
This is a development tool which contains libraries and its
supported file.
• Docs directory :-
It is the last directory of software development kit that assists
you to store the java documents.
HND23 46
M R R FARHAN Programming
Concept
Click
Start All Programs Accessories Notepad
Scaring
HND23 47
M R R FARHAN Programming
Concept
HND23 48
M R R FARHAN Programming
Concept
Notepad
o
o
HND23 50
M R R FARHAN Programming
Concept
HND23 51
M R R FARHAN Programming
Concept
Step 1: Open
Start Run
Step 2
Type:
Open:cmd
HND23 52
M R R FARHAN Programming
Concept
Step 3
Open the cmd :
Set path=
Step 4
HND23 53
M R R FARHAN Programming
Concept
There You Have Select the Program File and Open it.
HND23 54
M R R FARHAN Programming
Concept
HND23 55
M R R FARHAN Programming
Concept
HND23 56
M R R FARHAN Programming
Concept
Pate The Link Type Enter Aging Type JAVAC Type Enter JAVA will Run
HND23 57
M R R FARHAN Programming
Concept
Task 5.2
Software tough is a process that should follow a pattern definite plane. This trying
process is often performed by an independent quality assurance faction, also called a
test team, to help make certain a luxury, highly reliable software package by finding
and improvement errors.
So we have a plane to do the testing by using several methods. Project team must
have a sub team for the testing, and the test team leader must be a fully responsible
person to the testing part. After finish the testing, he/she should prepare a testing
report and submit to project leader with in the particular days (How many days
assigned for the testing at the schedule).
HND23 58
M R R FARHAN Programming
Concept
Task 5.3
User Login
HND23 59
M R R FARHAN Programming
Concept
Example:
Add : Add New Customer.
HND23 60
M R R FARHAN Programming
Concept
• Purchase Login
Example:
New : Add New Purchase.
HND23 61
M R R FARHAN Programming
Concept
• Sales Login
Example:
Sale : Add New Sales.
HND23 62
M R R FARHAN Programming
Concept
Example
Add New Sales
HND23 63
M R R FARHAN Programming
Concept
• Damage Login
Example:
Add : Add New Damage.
HND23 64
M R R FARHAN Programming
Concept
• Searching Login
Example:
Find : Search The Item Details.
HND23 65
M R R FARHAN Programming
Concept
Reference
http://en.wikipedia.org/wiki/object
www.smartdraw.com
www.mathworld.wolfram.com
www.nos.org/htm/course.htm
www.nos.org/htm/basic2.htm
http://math.about.com/od/combinatorics/index_r.htm
HND23 66