Professional Documents
Culture Documents
Flip Class (Using Java)
Flip Class (Using Java)
Java)
Presentation by:
Dr. S. Rajkumar
Associate Professor
School of Computing Science and Engineering
email: rajkumar.srinivasan@vit.ac.in
Room no: AB 4th Floor (Cabin:5)
References
1. Cay S.Horstmann and Gary Cornell, “Core Java: Volume I Fundamentals”, Eighth Edition,
Sun Microsystems Press, 2008.
2. Timothy Budd, “Understanding Object-oriented Programming with Java”, Updated
Edition, Pearson Education, 2000.
3. K.Arnold and J.Gosling, “The Java Programming language”, Third edition, Pearson
Education, 2000.
4. C.Thomas Wu, “An Introduction to Object-Oriented Programming with Java”, Fourth
Edition, TMH, 2006.
5. http://www.javadb.com
6. https://www.jdoodle.com/online-java-compiler/
---------Rajkumar S-----------
Basic algorithms
---------Rajkumar S-----------
Algorithm for swapping of 2 values
Step 1: Read the values of 'a' and 'b'
Step 2: Interchange the values by using the
temporary variable
2.1 temp<-a
2.2 a<-b
2.3 b<-temp
Step 3: Display a and b values.
---------Rajkumar S-----------
Alternative Algorithm for swapping of
2 values
Step 1: Read the values of 'a' and 'b'
Step 2: Interchange the values by using the
following relations:
2.1 a<-a+b
2.2 b<-a-b
2.3 a<-a-b
Step 3: Display a and b values.
---------Rajkumar S-----------
Steps to draft the program
• In linux, type gedit in “search” text field
• Draft the program in text editor
• Save the file using the main classname as the
filename
• Go to terminal for compiling and executing
program
---------Rajkumar S-----------
Example Program-1
---------Rajkumar S-----------
---------Rajkumar S-----------
How to compile and run the program?
(Refer the screen shot)
---------Rajkumar S-----------
---------Rajkumar S-----------
---------Rajkumar S-----------
---------Rajkumar S-----------