SlideShare a Scribd company logo
Advanced Programming
AWT and Swing
Gera
2020
1
Features of Java
➢Simple
➢Platform independent
➢Architectural Neutral
➢Portable
➢Multithreading
➢Networked
➢Distributed
2
➢High performance
➢Interpreted
➢Dynamic
➢Secured
➢Robust
➢Object Oriented Programming
Language
Features of Java…
Simple:
• Java is simple because of the following factors.
1. Java is free from pointers (i.e) java program does not contain pointers
concept hence we can achieve faster development of the program, faster
execution of the program. Whenever we write a java program that
program is internally converted into pointer program simplicity in
developing the code.
2. Java contains the in-built Garbage Collector program for improving the
performance of a java program.
• Garbage Collector: A Garbage collector is a system java program which
executes in the background along with regular java program for collecting
unused memory locations for improving performance.
3. Java contains user friendly syntaxes for quick development of program.
3
Features of Java…
Platform independent:
• A program is said to be platform independent if that program will run on all available
operating systems without considering their providers.
• -> The languages like c/cpp comes under plotform dependent since,
i) the data types of c/cpp takes different amount of memory space on different
os’s.
ii) the s/w c/cpp does not contain any special programs to convert one format of
one o.s to another format of another o.s.
• Note: DOS operating system understands Mozarta format whereas UNIX operating system
understands embedded linking format[elf].
• ->The language Java is treated as plotform independent language since the data types of
java takes same amount of memory space on all available operating systems.
• -> The s/w JDK[Java development kit] is containing the special programs which converts
from one format of one o.s to another format of another o.s.
• ->The slogan of Java is “Write once and reuse ( or) run anywhere”.
4
Features of Java…
Architectural Neutral:
• If any program runs (or) processed by all available processors
then that program is known as architectural neutral program.
• ->The languages like c/cpp comes under architectural dependent
programs, whereas, “Java” and “.net ” comes under architectural
neutral languages.
Portable:
• A program is said to be portable if which can execute on all
available OS’s and processed by all available processors without
considering their providers and architectures.
• Portability= Plot independent + Architectural Neutral
5
Features of Java…
Multithreading:
• Thread:- flow of control is called a thread.(flow of execution).
• A program is said to be multithreaded program if in which there exists multiple flow of controls and all such flow of
controls executed concurrently & simultaneously.
• ->The languages like c and cpp are treated as single threaded modeling languages.
• -> A single threaded modeling language is one in which there exists single flow of control.
• ->All single thread modeling languages executes the program sequentially and whole execution time is more.
Hence industry is not recommending to implement distributed applications with single threaded modeling
languages.
• -> The languages like “Java” and “.net” are treated as multithreaded modeling language since there exists multiple
flow of controls.
• -> Multitasking is the one specialized form of Multithreading. When we write any Java program there exists two
types of threads. They are
• i) background thread ii)foreground thread.
• -> A background thread is one which always monitors the status of foreground thread.
• -> A foreground thread is one which always executes user defined subprograms/functions. In Java environment,
background thread will exists only one time whereas foreground thread can exists either one ( or) many times.
6
Features of Java…
Networked:
• Java is networked programming language.
• A network is a collection of interconnected autonomous/non autonomous
computers for sharing the data.
• -> We have two categories of networks they are:
• I) Trusted Networks.
• Ii) Untrusted Networks.
• ->A Trusted network is one which is the collection of interconnected autonomous
computers with, trusted network architecture we can develop internet (or)
distributed applications.
• ->An Untrusted network is one in which there exists a collection of interconnected
non-autonomous computers, with untrusted network architecture we can develop
intranet ( or) centralized applications.
• Conclusion: The s/w Java contains the predefined API[library] for developing
network related applications.
7
Features of Java…
Distributed:
• A distributed program is one which runs in the context of
www/browser. Every distributed application can be accessed across
the Globe.
• E.g.:-servlets, jsp, ejb comes under distributed applications.
• High Performance:
• Java is high performance language since
i) Every Java program is internally executing with pointer
notation, whose execution time is very less.
• Java s/w contains one internal program called Garbage collector which
improves the performance of a java program by collecting unused
memory locations.
8
Features of Java…
Robust:
• Java is a Robust language since runtime errors can be processed
effectively.
• Eg: runtime error:10/0;
• Some of the runtime errors are division by zero problems, invalid
bounds of the array.
• Invalid formats of the number etc;
• “runtime errors” in Java are called “Exceptions”.
9
Features of Java…
Object Oriented Programming:
• Java is Object oriented programming language.
• In Information technology we have 2 types of programming models. They are:
i)Procedure oriented programming languages.
ii)Object oriented programming languages.
• ->Procedure oriented programming languages are those which will not provide security to
the data which is represented.
• Hence they are not recommended to develop internet applications.
• E.g.: C, PASCAL, COBOL, FOXPRO, etc.;
• -> Object oriented programming languages are those which provides security to the data
which we represent.
• E.g.: Ada, ALGOL, Small talk, C++, object-
• COBOL, object-PASCAL, Java, .NET etc.; ->The languages like Java and .NET provides 100%
security to the data which we represent, whereas other language like C++ may not be
providing 100% security. Hence the language cpp is not a pure object oriented
programming language.
10
AWT (Abstract Window Toolkit)
CUI(Character User Interface):-
In this we use the characters or commands to interact with
the application. The main disadvantage in CUI is that the
user has to remember several commands and their correct
syntax
CUI is not user friendly.
GUI(Graphics User Interface):-
The environment where the user can interact with an
application through graphics or images is called GUI.
11
AWT…
Advantages:-
1. User friendly
2. It adds attraction and beauty to an application by
adding pictures, colors, menus, animations etc.
3. GUI helps to create graphical components like push
buttons, radio buttons, check boxes, etc. and use them
effectively in our program.
12
AWT…
AWT:-
Abstract Window Toolkit(AWT) represents a class library to
develop applications using GUI.
The java.awt package got classes and interfaces to develop GUI
and let the users interact in a more friendly way with the
application.
Some important classes of java.awt package.
13
AWT…
Components:-
A component represents an object which is displayed pictorially on
the screen.
E.g.:- object of button class can be created Button b=new Button();
b is an object of button class. If we display this b on screen, it displays a
push button.
Therefore the object b, on going to the screen is becoming a component
called “push button”.
In the same way, any component is a graphical representation of
an object. Push buttons, radio buttons, check boxes, etc. are all
components.
14
AWT…
Window:- A window represents any imaginary rectangular area
on the screen, without any borders or title bar.
A frame represents a window with some title and borders In some
applications we create frames to represent various screens
where the user can type some data for the application and output
screens where the result may be displayed in a particular form.
Such screens are nothing but frames only.
A window is a frame without borders and title, whereas a frame
contains borders and title.
15
AWT…
Uses of frames:-
• To draw some graphical shapes like dots, lines,
rectangles etc.
• To display some text in the frame.
• To display pictures or images in the frame.
• To display components like push buttons, radio
buttons etc. in the frame.
16
AWT…
Creating a frame:-
A frame becomes the basic component in AWT. The frame has to
be created before any other component. The reason is all the
other components can be displayed in a frame.
3 ways to create a frame.
Create a frame class object,
1. Frame f=new Frame(); Create a frame class object, and pass
its title also
2. Frame f=new Frame(“My Frame”); Create a subclass myframe
to Frame class and create an object to that subclass
3. Class myframe extends Frame myframe f=new myframe();
17
AWT…
Creating a frame:-…
Since my frame is subclass of Frame it contains a copy of
Frame class and f represents frame.
A frame with 0 pixels width and 0 pixels height will be
created, which is not visible on the screen
A pixel(picture element) represents any single point or
dot on the screen.
Any data or picture which is displayed on the screen is
composed of several dots called pixels.
18
AWT…
Creating a frame:-…
• Monitors will accommodate total 800 pixels horizontally and 600
pixels vertically.
• Total pixels seen on one screen is 800*600 pixels. (4,80000).
This is called screen resolution.
We should increase frame size. This is done by
setSize() method as
f.setSize(300,400);
then display the frame
using setVisible() method as
f.setVisible(true);
19
AWT (Frame)
1. import java.awt.*;// Example of frame code 1
2. class frame
3. {
4. public static void main (String []args)
5. {
6. //creat frame
7. Frame f=new Frame("My AWT Frame");
8. //or f,steTitle("My AWT Frame");
9. //set size of frame
10. f.setSize(350,400);
11. //display the frame
12. f.setVisible(true);
13. }
14. }
20
AWT…
Event:-
•User wants the push button to perform some
action, clicks on the button. Clicking like this is
called event.
•An event represents specific action done on a
component.
•Clicking , double clicking typing data inside the
component, mouse over etc. are all examples of
events.
21
AWT…
Event delegation:-
• When an event is generated on the component, it cannot listen to
the event. We should add some listener to the component.
• A listener will have some abstract methods.
• When an event is generated by the user on the component, the
event is not handled by the component.
• The component sends (delegates) that event to the listener
attached to it.
• The listener will not handle the event. It hands over(delegates)the
event to an appropriate method.
• Finally the method is executed and the event is handled. This is
called “event delegation model”
22
AWT…
Event delegation:-
The following steps are involved in event delegation model:-
• Attach an appropriate listener to a component. This is done
using addXXXListener() method. To remove a listener, use
removeXXXListener() method.
• Implement the methods of the listener, the one which
handles the event.
• When an event is generated on component, then the method in
step 2 will be executed.
23
AWT…
Closing the frame:-
Frame is also a component.
When we click on its close button it should close.
To close the frame:-
We should attach a listener to the frame component.
All the listeners are available in java. awt. event package.
The most suitable listener to the frame is ‘
WindowListener ’. It can be attached using
addWindowListener() method as
f.addWindowListener(WindowListener obj);
addWindowListener() is a method having a parameter
that is expecting object of windowListener interface
24
AWT…
Closing the frame:-
• Since it is not possible to create an object of interface, we
should create an object to the implemention class of
interface and pass it to the method.
Window Listener interface calls the
Public void windowClosing() method when the frame is
being closed.
Public void WindowClosing(WindowEvent e)
{
System.exit(0);
}
25
AWT (Closing)
1. import java.awt.*; //AWT Simple Closing
2. import java.awt.event.*;
3. class myframe3 extends Frame
4. {
5. public static void main (String []args)
6. {
7. myframe3 f=new myframe3();
8. f.setTitle("Frameee");
9. f.setSize(500,200);
10. f.setVisible(true);
11. //close frame
12. f.addWindowListener(new myclass());
13. }
14. }
15. class myclass extends WindowAdapter
16. {
17. public void windowClosing(WindowEvent e)
18. {
19. System.exit(0);
20. }
21. }
26
1. import java.awt.*; //64 AWT Simple Closing 2
2. import java.awt.event.*;
3. class myframe4extends Frame
4. {
5. public static void main (String []args)
6. {
7. myframe4f=new myframe4();
8. f.setTitle("Frame4");
9. f.setSize(500,400);
10. f.setVisible(true);
11. //close frame
12. f.addWindowListener(newWindowAdapter()
13. {
14. public void windowClosing(WindowEvente)
15. {
16. System.exit(0);
17. }
18. });
19. }
20. }
AWT…
Font
• To set some font to the text we use setFont() method of Graphics
class as g. setFont(Font object); this method takes Font class object
which can be created as
• Font f= new Font(“sansSerif”,Font.BOLD,30); sansSerif represents the
font name, font.BOLD represents the font style and 30 represents
the font size in pixels.
There are totally 3 styles that we use
font.BOLD
font.ITALIC
font.PLAIN
• Font name: safe approach is to use a logical font name, one of
• “Times New Roman”, "Serif", "Monospaced",
"Dialog", "DialogInput", "Symbol"
27
AWT…
Displaying text in the frame:-
• To display text or strings in the frame we use drawstring()
method of Graphics class as
g.drawString(“hello”, x,y);
• here string “hello” will be displayed starting from the
coordinates(x,y)
• if we want to set some color we can use
g.setColor(Color.red);
28
AWT…
Color
There are 2 ways to set color in AWT
1. Directly mentioning the needed color name (13 predefined colors) from color class as
: Color.x where x is
• orange, pink, cyan, magenta, yellow, black, blue, white,
gray, lightGray, darkGray, red, green
2. To mention any color by combining the three primary colors: red, green and blue,
while creating color class object as.
color c= new color(r, g, b); r, g, b values changes from 0 to 255.
0 represents no color, 10 represents low intensity and 200 represents high intensity
of color.
Color c=new color(255,0,0)//red color
Color c=new color(255,255,255)//white color
Color c=new color(0,0,0)// black color
29
AWT (Background)
1. //frame with background color and message
2. import java.awt.*;
3. import java.awt.event.*;
4. class message extends Frame
5. {
6. message()
7. {
8. addWindowListener(new WindowAdapter()
9. {
10. public void windowClosing
(WindowEvent e)
11. {
12. System.exit(0);
13. }
14. });
15. }
16. public void paint(Graphics g)
30
17. {
18. //set Background
19. this.setBackground(new Color(250,0,2));
20. //set font
21. Font f=new Font ("times new
roman",Font.BOLD+Font.ITALIC,60);
22. g.setFont (f);
23. g.setColor(Color.blue);
24. g.drawString("Hello, How are you",10,80);
25. }
26. public static void main (String []args)
27. {
28. message m=new message();
29. m.setSize(550,300);
30. m.setVisible(true);
31. }
32. }
AWT (Demonstrate Colors)
1. import java.awt.*;
2. import javax.swing.JPanel;
3. public class ColorJPanel extends JPanel
4. {
5. public void paintComponent (Graphics g)
6. {
7. super.paintComponent( g);
8. this.setBackground(Color.WHITE);
9. g.setColor(new Color(255,0,0));
10. g.fillRect(15,25,100,20);
11. g.drawString("Current RGB:"+g.getColor(),130,40);
12. g.setColor(new Color(0.50f,0.75f,0.0f));
13. g.fillRect(15,50,100,20);
14. g.drawString("Current RGB:"+g.getColor(),130,65);
15. g.setColor(Color.BLUE);
16. g.fillRect(15,75,100,20);
17. g.drawString("Current RGB:"+g.getColor(),130,90);
18. Color color = Color.MAGENTA;
19. g.setColor(color);
20. g.fillRect(15,100,100,20);
21. g.drawString("RGB
values:"+color.getRed()+","+color.getGreen()+","+color.getBlue(),130,115);
22. }
23. }
31
1. import javax.swing.JFrame;
2. public class ShowColors
3. {
4. public static void main (String []args)
5. {
6. JFrame frame = new JFrame ("Using colors");
7. frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
8. ColorJPanel colorJPanel = new ColorJPanel();
9. frame.add(colorJPanel);
10. frame.setSize(400, 180);
11. frame.setVisible(true);
12. }
13. }
AWT…
Push buttons:-
Button class is useful to create push buttons. A push
button is useful to perform a particular action.
• To create a push button with a label we can create an
object to button class as
• Button b= new Button();//a button without any label is
created.
• Button b= new Button(“label”);//a button with label is
created.
• To get the label of the button use getLabel();
string l= b.getLabel();
32
AWT…
Push buttons:-…
• To set the label of the button b.setLabel(“label”); Label is
set to button b.
When there are several buttons & a button is clicked & we
have getActionCommand() method of ActionEvent class.
String s= ae.getActionCommand();
S is label of button.
To know source object which is clicked, we can use
getSource() of ActionEvent class as
Object obj=ae.getSource();
33
AWT…
Push buttons:-…
this. setLayout(null);
“this” represents current class object. Since the current
class mybuttons is a subclass of frame class we know
that mybuttons class object has a copy of frame
class
object within it. So any frame class methods can be
invoked using this.
So the setLayout method can be called using
this.setLayout();
34
AWT…
Push buttons:-…
setLayout method is used to set a layout of the
frame.
A layout represents a manner of arranging
components in the frame.
All the layouts are represented as
implementation classes of layoutmanager
interface.
35
AWT (Listeners and Listener methods)
36
Component Listener Listener methods
Button ActionListener public void
actionPerformed(ActionEvent e)
CheckBox ItemListener public void
itemStateChanged(ItemEvent e)
checkBoxGRoup ItemListener public void
itemStateChanged(ItemEvent e)
TextField ActionListener
focusListener
public void actionPerformed(ActionEvent e)
public void focusGained(ActionEvent e) public void
focusLost(ActionEvent e)
TextArea ActionListener
focusListener
public void
actionPerformed(ActionEvent e)
public void focusGained(ActionEvent e) public void
focusLost(ActionEvent e)
AWT (Listeners and Listener methods)
37
Component Listener Listener methods
Choice ActionListener
ItemListener
public void actionPerformed(ActionEvent e)
public void itemStateChanged(ItemEvent e)
List ActionListener
ItemListener
public void
actionPerformed(ActionEvent e)
public void
itemStateChanged(ItemEvent e)
ScrollBar AdjustmentLis
tener
MouseMotionListener
public void
adadjustmentValueChanged(AdjustmentEvent e)
public void mouseDragged(MouseEvent e)
public void mouseMoved(MouseEvente)
AWT (Listeners and Listener methods)
38
Component Listener Listener methods
Frame windowListener Public void
windowActivated(WindowEvent e) Public void
windowClosed(WindowEvent e) Public void
windowClosing(WindowEvent e) Public void
windowDeactivated(WindowEvent e) Public void
windowDeiconified(WindowEvent e) Public void
windowIconified(WindowEvent e)
Public void windowOpened(WindowEvent e)
Key board KeyListener Public void keyPressed(KeyEvent e)
Public void keyReleased(KeyEvent e)
Public void keyTyped(KeyEvent e)
Label No listener is
needed
AWT (Check Boxes)
A check box is a square shaped box which displays an option to the user
• To create checkbox we can create an object to checkbox class as
Checkbox cb= new Checkbox();//checkbox without any label
Checkbox cb= new Checkbox(“label”);//with label
Checkbox cb= new Checkbox(“label”, state);
if state is true check box will appear as if it is selected by default, else not selected.
• To get the state of the checkbox:-
Boolean b=cb.getState();
If the check box is selected this method returns true else false.
• To set the state of checkbox
Cb.setState(true);
• To get the label of check box
String s=cb.getLabel();
39
AWT (Radio Button)
A radio Button represents a round shaped button, such that only one can be selected
from a group of buttons.
Radio buttons can be created using CheckboxGroup class and checkbox classes.
First we should create a CheckboxGroup class object.
• To create a Radio button, pass CheckboxGroup object to Checkbox class object.
CheckboxGroup cbg=new CheckboxGroup();
Checkbox cb=new Checkbox(“label”, cbg, state);
• To know which Radio button is selected by the user
Checkbox cb=cbg.getSelectedCheckbox();
• To know the selected radio button’s label String
label=cbg.getselectedCheckbox().getLabel();
40
AWT (Label)
A Label is a constant text that is generally
displayed along with a TextField or TextArea.
To create a Label:-
Label l= new Label();//create an empty Label.
Label l= new Label(“text”, alignment constraint);
When the label is displayed there would be some
rectangular area allotted for the label.
41
AWT (Label)
A Label is a constant text that is generally
displayed along with a TextField or TextArea.
To create a Label:-
Label l= new Label();//create an empty Label.
Label l= new Label(“text”, alignment constraint);
When the label is displayed there would be some
rectangular area allotted for the label.
42
AWT (Choice class)
• This is useful to display choice menu
Choice ch=new Choice();//create empty choice
• Add item to it using add()
Ch.add(“item”);
• To know the name
String s=ch.getSelectedItem();
• Index of items in the choice menu starts from 0 onwards
Int i=ch.getSelectedIndex();
It returns -1 if nothing is selected.
43
AWT (Choice class)
• To get item String
String item=ch.getItem(int index);
• To know the no of items in choice menu
Int n=ch.getItemCount()
• To remove an item from choice at specified position
Ch.remove(int position)
• To remove an item from choice menu
Ch.remove(String item)
• To remove all items from choice menu
Ch.removeAll()
44
AWT (List class)
This class is useful to create a list box which is similar to
choice menu. A listbox presents the user with a scrolling
list of text items.
The user can select one or more items from the list box.
• To create a list box
List lst=new List();//this stmt creates a list box and
user can select only one item.
• List lst=new List(3);//displays initially 3 rows, the rest
of rows can be seen by clicking on the scroll button
45
AWT (List class)
• List lst=new List(3,true);//this list box displays 3
items, the next parameter true represents the user
can select more than one item from the available
items. If it is false then the user can select only one item.
• To add items to the list box we can use add() as
lst.add(“item”);
• To get all the selected items from the list box
String x[]=lst. getSelectedItems();
46
AWT (List class)
• To get the single selected item
String x=lst. getSelectedItem();
• To get selected items position numbers
Int x[]=lst.getSelectedIndexes();
• To get single selected item position number
Int x=lst. getSelectedIndex();
• To get the no. of visible lines(items)
Int x=lst. getRows();
• To get all the items available in the listbox
String x[]=lst.getItems();
47
AWT (List class)
• To get item name when the position number is known
String item=lst.getItem(int index);
• To know how many no. of items are there
Int x=lst.getItemCount();
• To remove an item at specified position
lst.remove(int position);
• To remove an item whose name is given
lst.remove(String item);
• To remove all the items from the list.
lst.removeAll();
48
AWT (Scrollbar class)
Scrollbar class is useful to create scrollbars that can be attached to a frame
or text area. Scrollbars are used to select continuous values b/w a specified
minimum and maximum.
Scrollbars can be arranged vertically or horizontally.
To create a Scrollbar
Scrollbar sb=new
Scrollbar(alignment,start,step,min,max);
Here,
Alingnment:Scrollbar.VERTICAL,
Scrollbar.HORIZONTAL
Start: starting value (Ex:0)
Step: step value(Ex:30)//represents scrollbar 49
AWT (Scrollbar class)
To create a Scrollbar…
length
Min: minimum value (Ex:0)
Max: maximum value (Ex:300)
• To know the location of Scrollbar we can use getValue() that
gives the position of scrollbar in pixels, as:
Int n=sb.getValue();
• To update the scrollbar position to a new
position, we can use setValue() method as:
Sb.setValue(int position); 50
AWT (Scrollbar class)
To create a Scrollbar…
• To get maximum value of the scrollbar:
Int x= sb.getMaximum();
• To get the minimum value of the scrollbar:
Int x=sb.getMinimum();
• To get the alignment of the scrollbar:
Int x=getOrientation();
This method returns zero if the scrollbar is aligned horizontally
and returns one if it is aligned vertically.
51
References
➢S. Horstmann and Gary Cornell, Core Java 2 – Volume II-
Advanced Features, Sun Microsystems Press
➢Harvey M. Deitel and Paul J. Deitel, Java How to
Program, Deitel & Associates
52
Gerabirhan Paulos
ToCourseInfo@gmail.com
Ad

More Related Content

What's hot (20)

Quality Concept
Quality ConceptQuality Concept
Quality Concept
Anand Jat
 
Decision Table Based Testing
Decision Table Based TestingDecision Table Based Testing
Decision Table Based Testing
Himani Solanki
 
Computer programming concepts
Computer programming conceptsComputer programming concepts
Computer programming concepts
Jasper John Cinatad
 
Software Metrics - Software Engineering
Software Metrics - Software EngineeringSoftware Metrics - Software Engineering
Software Metrics - Software Engineering
Drishti Bhalla
 
Client & server side scripting
Client & server side scriptingClient & server side scripting
Client & server side scripting
baabtra.com - No. 1 supplier of quality freshers
 
Software Engineering :UML class diagrams
Software Engineering :UML class diagramsSoftware Engineering :UML class diagrams
Software Engineering :UML class diagrams
Ajit Nayak
 
Chapter 01 software engineering pressman
Chapter 01  software engineering pressmanChapter 01  software engineering pressman
Chapter 01 software engineering pressman
RohitGoyal183
 
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Lovely Professional University
 
Multi Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing MachineMulti Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing Machine
Radhakrishnan Chinnusamy
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
Ratnakar Mikkili
 
Uml
UmlUml
Uml
Sulman Ahmed
 
And or graph
And or graphAnd or graph
And or graph
Ali A Jalil
 
Operating System a Case Study
Operating System a Case StudyOperating System a Case Study
Operating System a Case Study
ijtsrd
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.Net
Hitesh Santani
 
Visual programming lecture
Visual programming lecture Visual programming lecture
Visual programming lecture
AqsaHayat3
 
Software process
Software processSoftware process
Software process
Jennifer Polack
 
Chapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata TheoryChapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata Theory
Tsegazeab Asgedom
 
Compiler Construction introduction
Compiler Construction introductionCompiler Construction introduction
Compiler Construction introduction
Rana Ehtisham Ul Haq
 
Design Concept software engineering
Design Concept software engineeringDesign Concept software engineering
Design Concept software engineering
Darshit Metaliya
 
Introduction to parallel processing
Introduction to parallel processingIntroduction to parallel processing
Introduction to parallel processing
Page Maker
 
Quality Concept
Quality ConceptQuality Concept
Quality Concept
Anand Jat
 
Decision Table Based Testing
Decision Table Based TestingDecision Table Based Testing
Decision Table Based Testing
Himani Solanki
 
Software Metrics - Software Engineering
Software Metrics - Software EngineeringSoftware Metrics - Software Engineering
Software Metrics - Software Engineering
Drishti Bhalla
 
Software Engineering :UML class diagrams
Software Engineering :UML class diagramsSoftware Engineering :UML class diagrams
Software Engineering :UML class diagrams
Ajit Nayak
 
Chapter 01 software engineering pressman
Chapter 01  software engineering pressmanChapter 01  software engineering pressman
Chapter 01 software engineering pressman
RohitGoyal183
 
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Lovely Professional University
 
Operating System a Case Study
Operating System a Case StudyOperating System a Case Study
Operating System a Case Study
ijtsrd
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.Net
Hitesh Santani
 
Visual programming lecture
Visual programming lecture Visual programming lecture
Visual programming lecture
AqsaHayat3
 
Chapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata TheoryChapter1 Formal Language and Automata Theory
Chapter1 Formal Language and Automata Theory
Tsegazeab Asgedom
 
Compiler Construction introduction
Compiler Construction introductionCompiler Construction introduction
Compiler Construction introduction
Rana Ehtisham Ul Haq
 
Design Concept software engineering
Design Concept software engineeringDesign Concept software engineering
Design Concept software engineering
Darshit Metaliya
 
Introduction to parallel processing
Introduction to parallel processingIntroduction to parallel processing
Introduction to parallel processing
Page Maker
 

Similar to Advanced programming ch1 (20)

Srgoc java
Srgoc javaSrgoc java
Srgoc java
Gaurav Singh
 
Notes of java first unit
Notes of java first unitNotes of java first unit
Notes of java first unit
gowher172236
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
Harry Potter
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
James Wong
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
Luis Goldster
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
Young Alista
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
Hoang Nguyen
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
Tony Nguyen
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
Fraboni Ec
 
Java Programming Tutorials Basic to Advanced 1
Java Programming Tutorials Basic to Advanced 1Java Programming Tutorials Basic to Advanced 1
Java Programming Tutorials Basic to Advanced 1
JALALUDHEENVK1
 
JavaClassPresentation
JavaClassPresentationJavaClassPresentation
JavaClassPresentation
juliasceasor
 
unit1.pptx
unit1.pptxunit1.pptx
unit1.pptx
PrasadKalal4
 
JAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxJAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptx
SuganthiDPSGRKCW
 
Java and its features
Java and its featuresJava and its features
Java and its features
Pydi Nikhil
 
Java Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage EssayJava Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage Essay
Liz Sims
 
Java Programming Basics
Java Programming BasicsJava Programming Basics
Java Programming Basics
Rkrishna Mishra
 
2-Lec - History of OOP and Java (1) .ppt
2-Lec - History of OOP and Java  (1) .ppt2-Lec - History of OOP and Java  (1) .ppt
2-Lec - History of OOP and Java (1) .ppt
AqeelAbbas94
 
Java ppt-class_Introduction_class_Objects.ppt
Java ppt-class_Introduction_class_Objects.pptJava ppt-class_Introduction_class_Objects.ppt
Java ppt-class_Introduction_class_Objects.ppt
VGaneshKarthikeyan
 
Java ppt-class_basic data types methods definitions
Java ppt-class_basic data types methods definitionsJava ppt-class_basic data types methods definitions
Java ppt-class_basic data types methods definitions
ganeshkarthy
 
1 java introduction
1 java introduction1 java introduction
1 java introduction
abdullah al mahamud rosi
 
Notes of java first unit
Notes of java first unitNotes of java first unit
Notes of java first unit
gowher172236
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
Harry Potter
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
James Wong
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
Luis Goldster
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
Young Alista
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
Hoang Nguyen
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
Tony Nguyen
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
Fraboni Ec
 
Java Programming Tutorials Basic to Advanced 1
Java Programming Tutorials Basic to Advanced 1Java Programming Tutorials Basic to Advanced 1
Java Programming Tutorials Basic to Advanced 1
JALALUDHEENVK1
 
JavaClassPresentation
JavaClassPresentationJavaClassPresentation
JavaClassPresentation
juliasceasor
 
JAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxJAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptx
SuganthiDPSGRKCW
 
Java and its features
Java and its featuresJava and its features
Java and its features
Pydi Nikhil
 
Java Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage EssayJava Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage Essay
Liz Sims
 
2-Lec - History of OOP and Java (1) .ppt
2-Lec - History of OOP and Java  (1) .ppt2-Lec - History of OOP and Java  (1) .ppt
2-Lec - History of OOP and Java (1) .ppt
AqeelAbbas94
 
Java ppt-class_Introduction_class_Objects.ppt
Java ppt-class_Introduction_class_Objects.pptJava ppt-class_Introduction_class_Objects.ppt
Java ppt-class_Introduction_class_Objects.ppt
VGaneshKarthikeyan
 
Java ppt-class_basic data types methods definitions
Java ppt-class_basic data types methods definitionsJava ppt-class_basic data types methods definitions
Java ppt-class_basic data types methods definitions
ganeshkarthy
 
Ad

More from Gera Paulos (20)

Networking in java, Advanced programming
Networking in java, Advanced programmingNetworking in java, Advanced programming
Networking in java, Advanced programming
Gera Paulos
 
Remote Method Invocation, Advanced programming
Remote Method Invocation, Advanced programmingRemote Method Invocation, Advanced programming
Remote Method Invocation, Advanced programming
Gera Paulos
 
Multi Threading Concept (Advanced programming)
Multi Threading Concept (Advanced programming)Multi Threading Concept (Advanced programming)
Multi Threading Concept (Advanced programming)
Gera Paulos
 
Java Database Connectivity (Advanced programming)
Java Database Connectivity (Advanced programming)Java Database Connectivity (Advanced programming)
Java Database Connectivity (Advanced programming)
Gera Paulos
 
Servlets as introduction (Advanced programming)
Servlets as introduction (Advanced programming)Servlets as introduction (Advanced programming)
Servlets as introduction (Advanced programming)
Gera Paulos
 
Advanced programming ch2
Advanced programming ch2Advanced programming ch2
Advanced programming ch2
Gera Paulos
 
Image restoration and enhancement #2
Image restoration and enhancement #2 Image restoration and enhancement #2
Image restoration and enhancement #2
Gera Paulos
 
Introduction to digital image processing #1
Introduction to digital image processing #1Introduction to digital image processing #1
Introduction to digital image processing #1
Gera Paulos
 
Implement maintenance procedures
Implement maintenance proceduresImplement maintenance procedures
Implement maintenance procedures
Gera Paulos
 
Maintain equipment and consumables
Maintain equipment and consumablesMaintain equipment and consumables
Maintain equipment and consumables
Gera Paulos
 
Care for network and computer hardware
Care for network and computer hardwareCare for network and computer hardware
Care for network and computer hardware
Gera Paulos
 
Update and document operational procedures
Update and document operational proceduresUpdate and document operational procedures
Update and document operational procedures
Gera Paulos
 
Apply quality control
Apply quality controlApply quality control
Apply quality control
Gera Paulos
 
Monitoring implementation of work plan
Monitoring implementation of work planMonitoring implementation of work plan
Monitoring implementation of work plan
Gera Paulos
 
Provide first level remote help desk support
Provide first level remote help desk supportProvide first level remote help desk support
Provide first level remote help desk support
Gera Paulos
 
Configuring and administrate server
Configuring and administrate serverConfiguring and administrate server
Configuring and administrate server
Gera Paulos
 
Identifying and resolving network problems
Identifying and resolving network problemsIdentifying and resolving network problems
Identifying and resolving network problems
Gera Paulos
 
Conduct / facilitate user training
Conduct / facilitate user trainingConduct / facilitate user training
Conduct / facilitate user training
Gera Paulos
 
Monitor and administer system and network
Monitor and administer system and network Monitor and administer system and network
Monitor and administer system and network
Gera Paulos
 
Creating technical documents
Creating technical documentsCreating technical documents
Creating technical documents
Gera Paulos
 
Networking in java, Advanced programming
Networking in java, Advanced programmingNetworking in java, Advanced programming
Networking in java, Advanced programming
Gera Paulos
 
Remote Method Invocation, Advanced programming
Remote Method Invocation, Advanced programmingRemote Method Invocation, Advanced programming
Remote Method Invocation, Advanced programming
Gera Paulos
 
Multi Threading Concept (Advanced programming)
Multi Threading Concept (Advanced programming)Multi Threading Concept (Advanced programming)
Multi Threading Concept (Advanced programming)
Gera Paulos
 
Java Database Connectivity (Advanced programming)
Java Database Connectivity (Advanced programming)Java Database Connectivity (Advanced programming)
Java Database Connectivity (Advanced programming)
Gera Paulos
 
Servlets as introduction (Advanced programming)
Servlets as introduction (Advanced programming)Servlets as introduction (Advanced programming)
Servlets as introduction (Advanced programming)
Gera Paulos
 
Advanced programming ch2
Advanced programming ch2Advanced programming ch2
Advanced programming ch2
Gera Paulos
 
Image restoration and enhancement #2
Image restoration and enhancement #2 Image restoration and enhancement #2
Image restoration and enhancement #2
Gera Paulos
 
Introduction to digital image processing #1
Introduction to digital image processing #1Introduction to digital image processing #1
Introduction to digital image processing #1
Gera Paulos
 
Implement maintenance procedures
Implement maintenance proceduresImplement maintenance procedures
Implement maintenance procedures
Gera Paulos
 
Maintain equipment and consumables
Maintain equipment and consumablesMaintain equipment and consumables
Maintain equipment and consumables
Gera Paulos
 
Care for network and computer hardware
Care for network and computer hardwareCare for network and computer hardware
Care for network and computer hardware
Gera Paulos
 
Update and document operational procedures
Update and document operational proceduresUpdate and document operational procedures
Update and document operational procedures
Gera Paulos
 
Apply quality control
Apply quality controlApply quality control
Apply quality control
Gera Paulos
 
Monitoring implementation of work plan
Monitoring implementation of work planMonitoring implementation of work plan
Monitoring implementation of work plan
Gera Paulos
 
Provide first level remote help desk support
Provide first level remote help desk supportProvide first level remote help desk support
Provide first level remote help desk support
Gera Paulos
 
Configuring and administrate server
Configuring and administrate serverConfiguring and administrate server
Configuring and administrate server
Gera Paulos
 
Identifying and resolving network problems
Identifying and resolving network problemsIdentifying and resolving network problems
Identifying and resolving network problems
Gera Paulos
 
Conduct / facilitate user training
Conduct / facilitate user trainingConduct / facilitate user training
Conduct / facilitate user training
Gera Paulos
 
Monitor and administer system and network
Monitor and administer system and network Monitor and administer system and network
Monitor and administer system and network
Gera Paulos
 
Creating technical documents
Creating technical documentsCreating technical documents
Creating technical documents
Gera Paulos
 
Ad

Recently uploaded (20)

Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 

Advanced programming ch1

  • 1. Advanced Programming AWT and Swing Gera 2020 1
  • 2. Features of Java ➢Simple ➢Platform independent ➢Architectural Neutral ➢Portable ➢Multithreading ➢Networked ➢Distributed 2 ➢High performance ➢Interpreted ➢Dynamic ➢Secured ➢Robust ➢Object Oriented Programming Language
  • 3. Features of Java… Simple: • Java is simple because of the following factors. 1. Java is free from pointers (i.e) java program does not contain pointers concept hence we can achieve faster development of the program, faster execution of the program. Whenever we write a java program that program is internally converted into pointer program simplicity in developing the code. 2. Java contains the in-built Garbage Collector program for improving the performance of a java program. • Garbage Collector: A Garbage collector is a system java program which executes in the background along with regular java program for collecting unused memory locations for improving performance. 3. Java contains user friendly syntaxes for quick development of program. 3
  • 4. Features of Java… Platform independent: • A program is said to be platform independent if that program will run on all available operating systems without considering their providers. • -> The languages like c/cpp comes under plotform dependent since, i) the data types of c/cpp takes different amount of memory space on different os’s. ii) the s/w c/cpp does not contain any special programs to convert one format of one o.s to another format of another o.s. • Note: DOS operating system understands Mozarta format whereas UNIX operating system understands embedded linking format[elf]. • ->The language Java is treated as plotform independent language since the data types of java takes same amount of memory space on all available operating systems. • -> The s/w JDK[Java development kit] is containing the special programs which converts from one format of one o.s to another format of another o.s. • ->The slogan of Java is “Write once and reuse ( or) run anywhere”. 4
  • 5. Features of Java… Architectural Neutral: • If any program runs (or) processed by all available processors then that program is known as architectural neutral program. • ->The languages like c/cpp comes under architectural dependent programs, whereas, “Java” and “.net ” comes under architectural neutral languages. Portable: • A program is said to be portable if which can execute on all available OS’s and processed by all available processors without considering their providers and architectures. • Portability= Plot independent + Architectural Neutral 5
  • 6. Features of Java… Multithreading: • Thread:- flow of control is called a thread.(flow of execution). • A program is said to be multithreaded program if in which there exists multiple flow of controls and all such flow of controls executed concurrently & simultaneously. • ->The languages like c and cpp are treated as single threaded modeling languages. • -> A single threaded modeling language is one in which there exists single flow of control. • ->All single thread modeling languages executes the program sequentially and whole execution time is more. Hence industry is not recommending to implement distributed applications with single threaded modeling languages. • -> The languages like “Java” and “.net” are treated as multithreaded modeling language since there exists multiple flow of controls. • -> Multitasking is the one specialized form of Multithreading. When we write any Java program there exists two types of threads. They are • i) background thread ii)foreground thread. • -> A background thread is one which always monitors the status of foreground thread. • -> A foreground thread is one which always executes user defined subprograms/functions. In Java environment, background thread will exists only one time whereas foreground thread can exists either one ( or) many times. 6
  • 7. Features of Java… Networked: • Java is networked programming language. • A network is a collection of interconnected autonomous/non autonomous computers for sharing the data. • -> We have two categories of networks they are: • I) Trusted Networks. • Ii) Untrusted Networks. • ->A Trusted network is one which is the collection of interconnected autonomous computers with, trusted network architecture we can develop internet (or) distributed applications. • ->An Untrusted network is one in which there exists a collection of interconnected non-autonomous computers, with untrusted network architecture we can develop intranet ( or) centralized applications. • Conclusion: The s/w Java contains the predefined API[library] for developing network related applications. 7
  • 8. Features of Java… Distributed: • A distributed program is one which runs in the context of www/browser. Every distributed application can be accessed across the Globe. • E.g.:-servlets, jsp, ejb comes under distributed applications. • High Performance: • Java is high performance language since i) Every Java program is internally executing with pointer notation, whose execution time is very less. • Java s/w contains one internal program called Garbage collector which improves the performance of a java program by collecting unused memory locations. 8
  • 9. Features of Java… Robust: • Java is a Robust language since runtime errors can be processed effectively. • Eg: runtime error:10/0; • Some of the runtime errors are division by zero problems, invalid bounds of the array. • Invalid formats of the number etc; • “runtime errors” in Java are called “Exceptions”. 9
  • 10. Features of Java… Object Oriented Programming: • Java is Object oriented programming language. • In Information technology we have 2 types of programming models. They are: i)Procedure oriented programming languages. ii)Object oriented programming languages. • ->Procedure oriented programming languages are those which will not provide security to the data which is represented. • Hence they are not recommended to develop internet applications. • E.g.: C, PASCAL, COBOL, FOXPRO, etc.; • -> Object oriented programming languages are those which provides security to the data which we represent. • E.g.: Ada, ALGOL, Small talk, C++, object- • COBOL, object-PASCAL, Java, .NET etc.; ->The languages like Java and .NET provides 100% security to the data which we represent, whereas other language like C++ may not be providing 100% security. Hence the language cpp is not a pure object oriented programming language. 10
  • 11. AWT (Abstract Window Toolkit) CUI(Character User Interface):- In this we use the characters or commands to interact with the application. The main disadvantage in CUI is that the user has to remember several commands and their correct syntax CUI is not user friendly. GUI(Graphics User Interface):- The environment where the user can interact with an application through graphics or images is called GUI. 11
  • 12. AWT… Advantages:- 1. User friendly 2. It adds attraction and beauty to an application by adding pictures, colors, menus, animations etc. 3. GUI helps to create graphical components like push buttons, radio buttons, check boxes, etc. and use them effectively in our program. 12
  • 13. AWT… AWT:- Abstract Window Toolkit(AWT) represents a class library to develop applications using GUI. The java.awt package got classes and interfaces to develop GUI and let the users interact in a more friendly way with the application. Some important classes of java.awt package. 13
  • 14. AWT… Components:- A component represents an object which is displayed pictorially on the screen. E.g.:- object of button class can be created Button b=new Button(); b is an object of button class. If we display this b on screen, it displays a push button. Therefore the object b, on going to the screen is becoming a component called “push button”. In the same way, any component is a graphical representation of an object. Push buttons, radio buttons, check boxes, etc. are all components. 14
  • 15. AWT… Window:- A window represents any imaginary rectangular area on the screen, without any borders or title bar. A frame represents a window with some title and borders In some applications we create frames to represent various screens where the user can type some data for the application and output screens where the result may be displayed in a particular form. Such screens are nothing but frames only. A window is a frame without borders and title, whereas a frame contains borders and title. 15
  • 16. AWT… Uses of frames:- • To draw some graphical shapes like dots, lines, rectangles etc. • To display some text in the frame. • To display pictures or images in the frame. • To display components like push buttons, radio buttons etc. in the frame. 16
  • 17. AWT… Creating a frame:- A frame becomes the basic component in AWT. The frame has to be created before any other component. The reason is all the other components can be displayed in a frame. 3 ways to create a frame. Create a frame class object, 1. Frame f=new Frame(); Create a frame class object, and pass its title also 2. Frame f=new Frame(“My Frame”); Create a subclass myframe to Frame class and create an object to that subclass 3. Class myframe extends Frame myframe f=new myframe(); 17
  • 18. AWT… Creating a frame:-… Since my frame is subclass of Frame it contains a copy of Frame class and f represents frame. A frame with 0 pixels width and 0 pixels height will be created, which is not visible on the screen A pixel(picture element) represents any single point or dot on the screen. Any data or picture which is displayed on the screen is composed of several dots called pixels. 18
  • 19. AWT… Creating a frame:-… • Monitors will accommodate total 800 pixels horizontally and 600 pixels vertically. • Total pixels seen on one screen is 800*600 pixels. (4,80000). This is called screen resolution. We should increase frame size. This is done by setSize() method as f.setSize(300,400); then display the frame using setVisible() method as f.setVisible(true); 19
  • 20. AWT (Frame) 1. import java.awt.*;// Example of frame code 1 2. class frame 3. { 4. public static void main (String []args) 5. { 6. //creat frame 7. Frame f=new Frame("My AWT Frame"); 8. //or f,steTitle("My AWT Frame"); 9. //set size of frame 10. f.setSize(350,400); 11. //display the frame 12. f.setVisible(true); 13. } 14. } 20
  • 21. AWT… Event:- •User wants the push button to perform some action, clicks on the button. Clicking like this is called event. •An event represents specific action done on a component. •Clicking , double clicking typing data inside the component, mouse over etc. are all examples of events. 21
  • 22. AWT… Event delegation:- • When an event is generated on the component, it cannot listen to the event. We should add some listener to the component. • A listener will have some abstract methods. • When an event is generated by the user on the component, the event is not handled by the component. • The component sends (delegates) that event to the listener attached to it. • The listener will not handle the event. It hands over(delegates)the event to an appropriate method. • Finally the method is executed and the event is handled. This is called “event delegation model” 22
  • 23. AWT… Event delegation:- The following steps are involved in event delegation model:- • Attach an appropriate listener to a component. This is done using addXXXListener() method. To remove a listener, use removeXXXListener() method. • Implement the methods of the listener, the one which handles the event. • When an event is generated on component, then the method in step 2 will be executed. 23
  • 24. AWT… Closing the frame:- Frame is also a component. When we click on its close button it should close. To close the frame:- We should attach a listener to the frame component. All the listeners are available in java. awt. event package. The most suitable listener to the frame is ‘ WindowListener ’. It can be attached using addWindowListener() method as f.addWindowListener(WindowListener obj); addWindowListener() is a method having a parameter that is expecting object of windowListener interface 24
  • 25. AWT… Closing the frame:- • Since it is not possible to create an object of interface, we should create an object to the implemention class of interface and pass it to the method. Window Listener interface calls the Public void windowClosing() method when the frame is being closed. Public void WindowClosing(WindowEvent e) { System.exit(0); } 25
  • 26. AWT (Closing) 1. import java.awt.*; //AWT Simple Closing 2. import java.awt.event.*; 3. class myframe3 extends Frame 4. { 5. public static void main (String []args) 6. { 7. myframe3 f=new myframe3(); 8. f.setTitle("Frameee"); 9. f.setSize(500,200); 10. f.setVisible(true); 11. //close frame 12. f.addWindowListener(new myclass()); 13. } 14. } 15. class myclass extends WindowAdapter 16. { 17. public void windowClosing(WindowEvent e) 18. { 19. System.exit(0); 20. } 21. } 26 1. import java.awt.*; //64 AWT Simple Closing 2 2. import java.awt.event.*; 3. class myframe4extends Frame 4. { 5. public static void main (String []args) 6. { 7. myframe4f=new myframe4(); 8. f.setTitle("Frame4"); 9. f.setSize(500,400); 10. f.setVisible(true); 11. //close frame 12. f.addWindowListener(newWindowAdapter() 13. { 14. public void windowClosing(WindowEvente) 15. { 16. System.exit(0); 17. } 18. }); 19. } 20. }
  • 27. AWT… Font • To set some font to the text we use setFont() method of Graphics class as g. setFont(Font object); this method takes Font class object which can be created as • Font f= new Font(“sansSerif”,Font.BOLD,30); sansSerif represents the font name, font.BOLD represents the font style and 30 represents the font size in pixels. There are totally 3 styles that we use font.BOLD font.ITALIC font.PLAIN • Font name: safe approach is to use a logical font name, one of • “Times New Roman”, "Serif", "Monospaced", "Dialog", "DialogInput", "Symbol" 27
  • 28. AWT… Displaying text in the frame:- • To display text or strings in the frame we use drawstring() method of Graphics class as g.drawString(“hello”, x,y); • here string “hello” will be displayed starting from the coordinates(x,y) • if we want to set some color we can use g.setColor(Color.red); 28
  • 29. AWT… Color There are 2 ways to set color in AWT 1. Directly mentioning the needed color name (13 predefined colors) from color class as : Color.x where x is • orange, pink, cyan, magenta, yellow, black, blue, white, gray, lightGray, darkGray, red, green 2. To mention any color by combining the three primary colors: red, green and blue, while creating color class object as. color c= new color(r, g, b); r, g, b values changes from 0 to 255. 0 represents no color, 10 represents low intensity and 200 represents high intensity of color. Color c=new color(255,0,0)//red color Color c=new color(255,255,255)//white color Color c=new color(0,0,0)// black color 29
  • 30. AWT (Background) 1. //frame with background color and message 2. import java.awt.*; 3. import java.awt.event.*; 4. class message extends Frame 5. { 6. message() 7. { 8. addWindowListener(new WindowAdapter() 9. { 10. public void windowClosing (WindowEvent e) 11. { 12. System.exit(0); 13. } 14. }); 15. } 16. public void paint(Graphics g) 30 17. { 18. //set Background 19. this.setBackground(new Color(250,0,2)); 20. //set font 21. Font f=new Font ("times new roman",Font.BOLD+Font.ITALIC,60); 22. g.setFont (f); 23. g.setColor(Color.blue); 24. g.drawString("Hello, How are you",10,80); 25. } 26. public static void main (String []args) 27. { 28. message m=new message(); 29. m.setSize(550,300); 30. m.setVisible(true); 31. } 32. }
  • 31. AWT (Demonstrate Colors) 1. import java.awt.*; 2. import javax.swing.JPanel; 3. public class ColorJPanel extends JPanel 4. { 5. public void paintComponent (Graphics g) 6. { 7. super.paintComponent( g); 8. this.setBackground(Color.WHITE); 9. g.setColor(new Color(255,0,0)); 10. g.fillRect(15,25,100,20); 11. g.drawString("Current RGB:"+g.getColor(),130,40); 12. g.setColor(new Color(0.50f,0.75f,0.0f)); 13. g.fillRect(15,50,100,20); 14. g.drawString("Current RGB:"+g.getColor(),130,65); 15. g.setColor(Color.BLUE); 16. g.fillRect(15,75,100,20); 17. g.drawString("Current RGB:"+g.getColor(),130,90); 18. Color color = Color.MAGENTA; 19. g.setColor(color); 20. g.fillRect(15,100,100,20); 21. g.drawString("RGB values:"+color.getRed()+","+color.getGreen()+","+color.getBlue(),130,115); 22. } 23. } 31 1. import javax.swing.JFrame; 2. public class ShowColors 3. { 4. public static void main (String []args) 5. { 6. JFrame frame = new JFrame ("Using colors"); 7. frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); 8. ColorJPanel colorJPanel = new ColorJPanel(); 9. frame.add(colorJPanel); 10. frame.setSize(400, 180); 11. frame.setVisible(true); 12. } 13. }
  • 32. AWT… Push buttons:- Button class is useful to create push buttons. A push button is useful to perform a particular action. • To create a push button with a label we can create an object to button class as • Button b= new Button();//a button without any label is created. • Button b= new Button(“label”);//a button with label is created. • To get the label of the button use getLabel(); string l= b.getLabel(); 32
  • 33. AWT… Push buttons:-… • To set the label of the button b.setLabel(“label”); Label is set to button b. When there are several buttons & a button is clicked & we have getActionCommand() method of ActionEvent class. String s= ae.getActionCommand(); S is label of button. To know source object which is clicked, we can use getSource() of ActionEvent class as Object obj=ae.getSource(); 33
  • 34. AWT… Push buttons:-… this. setLayout(null); “this” represents current class object. Since the current class mybuttons is a subclass of frame class we know that mybuttons class object has a copy of frame class object within it. So any frame class methods can be invoked using this. So the setLayout method can be called using this.setLayout(); 34
  • 35. AWT… Push buttons:-… setLayout method is used to set a layout of the frame. A layout represents a manner of arranging components in the frame. All the layouts are represented as implementation classes of layoutmanager interface. 35
  • 36. AWT (Listeners and Listener methods) 36 Component Listener Listener methods Button ActionListener public void actionPerformed(ActionEvent e) CheckBox ItemListener public void itemStateChanged(ItemEvent e) checkBoxGRoup ItemListener public void itemStateChanged(ItemEvent e) TextField ActionListener focusListener public void actionPerformed(ActionEvent e) public void focusGained(ActionEvent e) public void focusLost(ActionEvent e) TextArea ActionListener focusListener public void actionPerformed(ActionEvent e) public void focusGained(ActionEvent e) public void focusLost(ActionEvent e)
  • 37. AWT (Listeners and Listener methods) 37 Component Listener Listener methods Choice ActionListener ItemListener public void actionPerformed(ActionEvent e) public void itemStateChanged(ItemEvent e) List ActionListener ItemListener public void actionPerformed(ActionEvent e) public void itemStateChanged(ItemEvent e) ScrollBar AdjustmentLis tener MouseMotionListener public void adadjustmentValueChanged(AdjustmentEvent e) public void mouseDragged(MouseEvent e) public void mouseMoved(MouseEvente)
  • 38. AWT (Listeners and Listener methods) 38 Component Listener Listener methods Frame windowListener Public void windowActivated(WindowEvent e) Public void windowClosed(WindowEvent e) Public void windowClosing(WindowEvent e) Public void windowDeactivated(WindowEvent e) Public void windowDeiconified(WindowEvent e) Public void windowIconified(WindowEvent e) Public void windowOpened(WindowEvent e) Key board KeyListener Public void keyPressed(KeyEvent e) Public void keyReleased(KeyEvent e) Public void keyTyped(KeyEvent e) Label No listener is needed
  • 39. AWT (Check Boxes) A check box is a square shaped box which displays an option to the user • To create checkbox we can create an object to checkbox class as Checkbox cb= new Checkbox();//checkbox without any label Checkbox cb= new Checkbox(“label”);//with label Checkbox cb= new Checkbox(“label”, state); if state is true check box will appear as if it is selected by default, else not selected. • To get the state of the checkbox:- Boolean b=cb.getState(); If the check box is selected this method returns true else false. • To set the state of checkbox Cb.setState(true); • To get the label of check box String s=cb.getLabel(); 39
  • 40. AWT (Radio Button) A radio Button represents a round shaped button, such that only one can be selected from a group of buttons. Radio buttons can be created using CheckboxGroup class and checkbox classes. First we should create a CheckboxGroup class object. • To create a Radio button, pass CheckboxGroup object to Checkbox class object. CheckboxGroup cbg=new CheckboxGroup(); Checkbox cb=new Checkbox(“label”, cbg, state); • To know which Radio button is selected by the user Checkbox cb=cbg.getSelectedCheckbox(); • To know the selected radio button’s label String label=cbg.getselectedCheckbox().getLabel(); 40
  • 41. AWT (Label) A Label is a constant text that is generally displayed along with a TextField or TextArea. To create a Label:- Label l= new Label();//create an empty Label. Label l= new Label(“text”, alignment constraint); When the label is displayed there would be some rectangular area allotted for the label. 41
  • 42. AWT (Label) A Label is a constant text that is generally displayed along with a TextField or TextArea. To create a Label:- Label l= new Label();//create an empty Label. Label l= new Label(“text”, alignment constraint); When the label is displayed there would be some rectangular area allotted for the label. 42
  • 43. AWT (Choice class) • This is useful to display choice menu Choice ch=new Choice();//create empty choice • Add item to it using add() Ch.add(“item”); • To know the name String s=ch.getSelectedItem(); • Index of items in the choice menu starts from 0 onwards Int i=ch.getSelectedIndex(); It returns -1 if nothing is selected. 43
  • 44. AWT (Choice class) • To get item String String item=ch.getItem(int index); • To know the no of items in choice menu Int n=ch.getItemCount() • To remove an item from choice at specified position Ch.remove(int position) • To remove an item from choice menu Ch.remove(String item) • To remove all items from choice menu Ch.removeAll() 44
  • 45. AWT (List class) This class is useful to create a list box which is similar to choice menu. A listbox presents the user with a scrolling list of text items. The user can select one or more items from the list box. • To create a list box List lst=new List();//this stmt creates a list box and user can select only one item. • List lst=new List(3);//displays initially 3 rows, the rest of rows can be seen by clicking on the scroll button 45
  • 46. AWT (List class) • List lst=new List(3,true);//this list box displays 3 items, the next parameter true represents the user can select more than one item from the available items. If it is false then the user can select only one item. • To add items to the list box we can use add() as lst.add(“item”); • To get all the selected items from the list box String x[]=lst. getSelectedItems(); 46
  • 47. AWT (List class) • To get the single selected item String x=lst. getSelectedItem(); • To get selected items position numbers Int x[]=lst.getSelectedIndexes(); • To get single selected item position number Int x=lst. getSelectedIndex(); • To get the no. of visible lines(items) Int x=lst. getRows(); • To get all the items available in the listbox String x[]=lst.getItems(); 47
  • 48. AWT (List class) • To get item name when the position number is known String item=lst.getItem(int index); • To know how many no. of items are there Int x=lst.getItemCount(); • To remove an item at specified position lst.remove(int position); • To remove an item whose name is given lst.remove(String item); • To remove all the items from the list. lst.removeAll(); 48
  • 49. AWT (Scrollbar class) Scrollbar class is useful to create scrollbars that can be attached to a frame or text area. Scrollbars are used to select continuous values b/w a specified minimum and maximum. Scrollbars can be arranged vertically or horizontally. To create a Scrollbar Scrollbar sb=new Scrollbar(alignment,start,step,min,max); Here, Alingnment:Scrollbar.VERTICAL, Scrollbar.HORIZONTAL Start: starting value (Ex:0) Step: step value(Ex:30)//represents scrollbar 49
  • 50. AWT (Scrollbar class) To create a Scrollbar… length Min: minimum value (Ex:0) Max: maximum value (Ex:300) • To know the location of Scrollbar we can use getValue() that gives the position of scrollbar in pixels, as: Int n=sb.getValue(); • To update the scrollbar position to a new position, we can use setValue() method as: Sb.setValue(int position); 50
  • 51. AWT (Scrollbar class) To create a Scrollbar… • To get maximum value of the scrollbar: Int x= sb.getMaximum(); • To get the minimum value of the scrollbar: Int x=sb.getMinimum(); • To get the alignment of the scrollbar: Int x=getOrientation(); This method returns zero if the scrollbar is aligned horizontally and returns one if it is aligned vertically. 51
  • 52. References ➢S. Horstmann and Gary Cornell, Core Java 2 – Volume II- Advanced Features, Sun Microsystems Press ➢Harvey M. Deitel and Paul J. Deitel, Java How to Program, Deitel & Associates 52 Gerabirhan Paulos [email protected]