100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Java Programming $9.79   Add to cart

Essay

Java Programming

 2 views  0 purchase
  • Course
  • Institution

Java Programming is one of the significancant areas of study in this digital era . Our document contains a detailed explanation on Java programming, Inheritance, Exception handling, Collection Framework in Java,GUI programming with swing etc. If a person ignorent of Java reads our document definite...

[Show more]

Preview 4 out of 132  pages

  • September 21, 2023
  • 132
  • 2023/2024
  • Essay
  • Unknown
  • A+
avatar-seller
JAVA PROGRAMMING
Objectives:
This subject aims to introduce students to the Java programming language. Upon successful
completion of this subject, students should be able to create Java programs that leverage the object-
oriented features of the Java language, such as encapsulation, inheritance and polymorphism; use data
types, arrays and other data collections; implement error-handling techniques using exception handling,
create and event-driven GUI using Swing components.

UNIT‐I
Java Programming‐ History of Java, comments, Data types, Variables, Constants, Scope and Lifetime of
variables, Operators, Type conversion and casting, Enumerated types, Control flow ‐ block scope, conditional
statements, loops, break and continue statements, arrays, simple java stand alone programs, class, object,
and its methods constructors, methods, static fields and methods, access control, this reference,
overloading constructors, recursion, exploring string class, garbage collection
UNIT – II
Inheritance – Inheritance types, super keyword, preventing inheritance: final classes and methods..
Polymorphism – method overloading and method overriding, abstract classes and methods.
Interfaces‐ Interfaces Vs Abstract classes, defining an interface, implement interfaces, accessing
implementations through interface references, extending interface, inner class.
Packages‐ Defining, creating and accessing a package, importing packages.
UNIT‐III
Exception handling‐Benefits of exception handling, the classification of exceptions ‐ exception hierarchy,
checked exceptions and unchecked exceptions, usage of try, catch, throw, throws and finally, creating own
exception subclasses.
Multithreading – Differences between multiple processes and multiple threads, thread life cycle, creating
threads, interrupting threads, thread priorities, synchronizing threads, inter‐thread communication,
producer consumer problem.
UNIT‐IV
Collection Framework in Java – Introduction to java collections, Overview of java collection framework,
Commonly used collection classes‐ Array List, Vector, Hash table, Stack, Lambda Expressions.
Files‐ Streams‐ Byte streams, Character streams, Text input/output, Binary input/output, File management
using File class.
Connecting to Database – JDBC Type 1 to 4 drivers, Connecting to a database, querying a database and
processing the results, updating data with JDBC,Data Access Object (DAO).
UNIT‐V
GUI Programming with Swing ‐ The AWT class hierarchy, Introduction to Swing, Swing Vs AWT, Hierarchy for
Swing components, Overview of some Swing components – Jbutton, JLabel, JTextField, JTextArea, simple
Swing applications, Layout management – Layout manager types – border, grid and flow
Event Handling‐ Events, Event sources, Event classes, Event Listeners, Delegation event model, Examples:
Handling Mouse and Key events, Adapter classes.




[JAVA PROGRAMMING] Page 2

,TEXT BOOK:
1. JavaFundamentals–AComprehensiveIntroduction,HerbertSchildtandDaleSkrien,TMH.
2. Core Java: An Integrated Approach – Dr R NageswaraRao

REFERENCE BOOKS:
1. Java for Programmers, P.J.Deitel and H.M.Deitel, PEA (or) Java: How to Program , P.J.Deitel
and H.M.Deitel,PHI
2. ObjectOrientedProgrammingthroughJava,P.RadhaKrishna,UniversitiesPress.
3. Thinking in Java, Bruce Eckel,PE
4. Programming in Java, S. Malhotra and S. Choudhary, Oxford UniversitiesPress.
5. Design Patterns Erich Gamma, Richard Helm, Ralph Johnson and JohnVlissides.

Outcomes:
 An understanding of the principles and practice of object oriented analysis and design
intheconstructionofrobust,maintainableprogramswhichsatisfytheirrequirements;
 Acompetencetodesign,write,compile,testandexecutestraightforwardprograms using a high
levellanguage;
 An appreciation of the principles of object orientedprogramming;
 Anawarenessoftheneedforaprofessionalapproachtodesignandtheimportanceof good documentation
to the finishedprograms.
 Beabletoimplement,compile,testandrunJavaprogramscomprisingmorethanone class, to address
a particular software problem.
 DemonstratetheabilitytousesimpledatastructureslikearraysinaJavaprogram.
 BeabletomakeuseofmembersofclassesfoundintheJavaAPI(suchastheMathclass).
 Demonstrate the ability to employ various types of selection constructs in a Java program. Be able
to employ a hierarchy of Java classes to provide a solution to a given set ofrequirements.
 Able to develop applications using Applet, AWT, JDBC andSwings




[JAVA PROGRAMMING] Page 3

, MALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY
DEPARTMENT OF INFORMATION TECHNOLOGY
UNIT I
Java Programming‐ History of Java, comments, Data types, Variables, Constants, Scope and Lifetime of
variables, Operators, Type conversion and casting, Enumerated types, Control flow ‐ block scope, conditional
statements, loops, break and continue statements, arrays, simple java stand alone programs, class, object,
and its methods constructors, methods, static fields and methods, access control, this reference,
overloading constructors, recursion, exploring string class, garbage collection

Introduction

Everywhere you look in the real world you see objects—people, animals, plants, cars, planes,
buildings, computers and so on. Humans think in terms of objects. Telephones, houses, traffic lights,
microwave ovens and water coolers are just a few more objects. Computer programs, such
as the Java programs you’ll read in this book interacting software objects.


We sometimes divide objects into two categories: animate and inanimate. Animate objects are
―alive‖ theyinmovesomearound andsensedothings. —Inanimate objects, on the other hand, do not
move on their own .Objects of both types, however, have some things in common. They all have
attributes (e.g., size, shape, color and weight), and they all exhibit behaviors (e.g., a ball rolls,
bounces, inflates and deflates; a baby cries, sleep crawls, walks and blinks; a car accelerates, brakes
and turns; a towel absorbs water). We will study the kinds of attributes and behaviors that software
objects have. Humans learn about existing objects by studying their attributes and observing their
behaviors. Different objects can have similar attributes and can exhibit similar behaviors.
Comparisons can be made, for example, between babies and adults and between humans and
chimpanzees. Object-oriented design provides a natural and intuitive way to view the software
design process—namely, modeling objects by their attributes and behaviors just as we describe real-
world objects. OOD also models communication between objects. Just as people send messages to
one another (e.g., a sergeant commands a soldier to stand at attention), objects also communicate via
messages. A bank account object may receive a message to decrease its balance by a certain amount
because the customer has withdrawn that amount of money.
Object-Oriented:

Although influenced by its predecessors, Java was not designed to be source-code compatible with
any other language. This allowed the Java team the freedom to design with a blank slate. One
outcome of this was a clean, usable, pragmatic approach to objects. Borrowing liberally from many
seminal object-software environments of the last few decades, Java manages to strike
a balance between the purist’s ―everything is of my way‖ model. The object model in Java i such as
integers, are kept as high-performance non objects.




[JAVA PROGRAMMING] Page 4

, OOD encapsulates (i.e., wraps) attributes and operations (behaviors) into objects, an object’s
attributes and operations are intim information hiding. This means that objects may know how to
communicate with one another across well-defined interfaces, but normally they are not allowed to
know how other objects are implemented ,implementation details are hidden within the objects
themselves. Wecan drive a car effectively, for instance, without knowing the details of how engines,
transmissions, brakes and exhaust systems work internally—as long as we know how to use the
accelerator pedal, the brake pedal, the wheel and so on. Information hiding, as we will see, is crucial
to good software engineering.


Languages like Java are object oriented. Programming in such a language is called object-oriented
programming (OOP), and it allows computer programmers to implement an object-oriented design as a
working system. Languages like C, on the other hand, are procedural, so programming tends to be action
oriented. In C, the unit of programming is the function. Groups of actions that perform some common task are
formed into functions, and functions are grouped to form programs. In Java, the unit of programming is the
class from which objects are eventually instantiated (created). Java classes contain methods (which implement
operations and are similar to functions in C) as well as fields (which implement attributes).


Java programmers concentrate on creating classes. Each class contains fields, and the set of methods that
manipulate the fields and provide services to clients (i.e., other classes that use the class). The programmer
uses existing classes as the building blocks for constructing new classes. Classes are to objects as blueprints
are to houses. Just as we can build many houses from one blueprint, we can instantiate (create) many objects
from one class.
Classes can have relationships with other classes. For example, in an object-oriented design of a bank, the
―bank teller‖ class needs to relate ―safe‖ class, and so on. These relationships

Packaging software as classes makes it possible for future software systems to reuse the classes.
Groups of related classes are often packaged as reusable components. Just as realtors often say
that the three most important factors affecti location,‖ people in the software community affecting
the future of software development are ―reuse, classes when building new classes and programs
saves time and effort.Reuse also helps

programmers build more reliable and effective systems, because existing classes and components often have
gone through extensive testing, debugging and performance tuning.

Indeed, with object technology, you can build much of the software you will need by combining classes, just
as automobile manufacturers combine interchangeable parts. Each new class you create will have the potential
to become a valuable software asset that you and other programmers can use to speed and enhance the quality
of future software development efforts.




[JAVA PROGRAMMING] Page 5

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller balajisrinevasan. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $9.79. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

76800 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$9.79
  • (0)
  Add to cart