An
Internship Report
ON
“Java”
From
“INTERNSHALA”
Including
“CORE JAVA”
SUBMITTED BY:
NAME: PRAKHAR SINGH
ROLL NO: 2101330100170
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
[Link] 2nd YEAR
3rd SEMESTER (2022-23)
Under Supervision of
Ms. PRIYA SINGH, Mr. RAHUL KUMAR
NOIDA INSTITUE OF ENGINEERING AND TECHNOLOGY
GREATER NOIDA
Declaration
I, Prakhar Singh, Student of BTech (CSE) Declared that the project
titled “TEMPERATURE CONVERTER TOOL”, which is submitted
by me to the Department of Computer Science and Engineering, Noida
Institute of Engineering and Technology, Greater Noida affiliated to
Abdul Kalam Technical University(AKTU) , Lucknow.
Prakhar Singh
Acknowledgement
I am grateful to INTERNSHALA, for giving me opportunity to carry out the
project work in the area of online based applications designing during my
training. I would like to also thank my institute, Noida Institute of Engineering
and Technology, Knowledge Park 2, Greater Noida for giving permission and
necessary administrative support to take up the training work at Internshala.
Deepest thanks to My Teachers Priya Singh and Rahul Kumar for her guidance,
monitoring, constant encouragement and correcting various assignments of ours
with attention and care. She has taken pain to go through the project and
training sessions and make necessary corrections as when needed and we are
very grateful for that.
INDEX
For Course
S. No. TITLE Pg No.
1. Course Certificate
2. Course Objective
3. Perquisite Knowledge Required
4. Course Modules
5. Brief description of course.
6. Course learning outcomes
7. Applications of the course
8. Advanced courses suggested for future
CERTIFICATE
COURSE OBJECTIVE
The main ideas behind Java’s Object Oriented
Programming ,OOP concepts include Abstraction ,
Encapsulation , Inheritance , and Polymorphism.
To learn how to implement Object Oriented
Programming design with Java.
To identify Java language components and how they
work together in applications.
To design and program stand – alone Java applications.
Introduction
Java is one of the programming language or technology used for developing
web applications. Java language developed at SUN Micro Systems in the year
1995 under the guidance of James Gosling and there team.
Originally , SUN Micro Systems has released on the name of OAK ,which is
original name of Java (Scientifically OAK is one of the tree name). James
Gosling again reviews this OAK and released with the name of Java in the year
1995. Scientifically Java is one of the coffee name.
Java divided into three categories , they are
J2SE(Java 2 Standard Edition)
J2EE(Java 2 Enterprise Edition)
J2ME(Java 2 Micro or Mobile Edition)
J2SE
J2SE is used for developing client side applications.
J2EE
J2EE is used for developing server side applications.
J2ME
J2ME is used for developing mobile or wireless applications by making use
of a predefined protocol called WAP(Wireless Access / Application Protocol).
Basics of Java
JRE
The Java Runtime Environment (JRE) is part of the Java Development Kit
(JDK). It contains set of libraries and tools for developing java application. The
Java Runtime Environment provides the minimum requirements for executing a
Java application.
JVM
JVM is set of programs developed by sun Micro System and supplied as a part
of JDK for reading line by line of byte code and it converts into native
understanding form of operating system. Java language is one of the compiled
and interpreted programming Language.
Garbage Collector
Garbage Collector is the system Java program which runs in the background
along with regular Java program to collect un-Referenced (unused) memory
space for improving the performance of our applications.
API
An API (Application Programming Interface) is a collection of packages, a
package is the collection of classes, interfaces and sub-packages. A sub-package
is a collection of classes interfaces and Sub- packages etc.
JIT
JIT (Just In Time) is the set of programs developed by SUN Micro System and
added as a part of JVM, to speed up the interpretation phase.
Difference Between JDK, JRE AND JVM
JVM, JRE, JDK these all the backbone of java language. Each Components
have separate works. JDK and JRE physically exists but JVM are abstract
machine it means it not physically exists.
JVM : JVM (Java Virtual Machine) is a software. It is a specification that
provides runtime environment in which java bytecode can be executed. It not
physically exists .JVMs are not same for all hardware and software, for example
for window OS JVM is different and for Linux VJM is different. JVM, JRE and
JDK are platform dependent because configuration of each OS differs. But, Java
is platform independent.
JRE: The Java Runtime Environment (JRE) is part of the Java Development
Kit (JDK). It contains set of libraries and tools for developing java application.
The Java Runtime Environment provides the minimum requirements for
executing a Java application. It physically exists. It contains set of libraries +
other files that JVM uses at runtime.
Object And Class
Object is the physical as well as logical entity where as class is the only logical
entity.
Class : Class is a blue print which is containing only list of variables and
method and no memory is allocated for them. A class is a group of objects that
has common properties.
A class in java contains:
Data Member
Method
Constructor
Block
Class and Interface
Object : Object is a instance of class, object has state and [Link] Object
in java has three Characteristcs:
State
Behavior
Identity
State : Represents data (value) of an object.
Behavior : Represents the behaviour (functionality) of an object such as
deposit, withdraw etc. Identity: Object identity is typically implemented via
a unique ID. The value of the ID is not visible to the external user. But,it is
used internally by the JVM to identify each object uniquely.
Data Types
Datatype is a special keyword used to allocate sufficient memory space for
the data, in other words Data type is used for representing the data in main
memory (RAM) of the computer.
In general every programming language is containing three categories of
data types. They are
Fundamental or primitive data types
Derived data types
User defined data types.
Data type Default Value Default size
boolean false 1 bit
char ‘\u0000’ 2 byte
byte 0 1 byte
short 0 2 byte
int 0 4 byte
long 0L 8 byte
float 0.0f 4 byte
double 0.0d 8 byte
Variable
Variable is an identifier which holds data or another one variable is an
identifier whose value can be changed at the execution time of program.
Variable is an identifier which can be used to identify input data in a
program.
Operators and Its Types
Operator is a special symbol that tells the compiler to perform specific
mathematical or logical Operation. Java supports following lists of
operators.
Arithmetic Operators
Relational Operators
Logical Operators
Bitwise Operators
Assignment Operators
Ternary or Conditional Operators
Decision Making Statement
Decision making statement statements is also called selection statement.
That is depending on the condition block need to be executed or not which
is decided by condition. If the condition is “true” statement block will be
executed, if condition is “false” then statement block will not be executed.
In java there are three types of decision making statement.
if
if-else
Switch
Looping Statement
for
while
do while
JAVA USEFUL KEYWORDS
Final keyword
In java language final keyword can be used in following way.
Final at variable level
Final at method level
Final at class level
Static keyword
The static keyword is used in java mainly for memory management. Static
keyword are used with variables, methods, blocks and nested class. Static is
a keyword that are used for share the same variable or method of a given
class. This is used for a constant variable or a method that is the same for
every instance of a class. The main method of a class is generally labelled
static.
In java language static keyword can be used for following :
Variable (also known as class variable)
Method (also known as class method)
Block
Nested class
This keyword
This is a reference variable that refers to the current object. It is a keyword in
java language represents current class object
“this” keyword can be use in two ways.
this . (this dot)
this() (this off)
Super keyword
Super keyword in java is a reference variable that is used to refer parent
class object. Super is an implicit keyword create by JVM and supply each
and every java program for performing important role in three places.
At variable level
At method level
At constructor level
Synchronized Keyword
Synchronized Keyword is used for when we want to allow only one thread
at a time then use Synchronized modifier. If a method or block declared as a
Synchronized then at a time only one thread is allowed to operate on the given
object.
JAVA CLASSES, BLOCKS AND CONSTRUCTORS
Abstract Classes
We know that every java program must start with a concept of class that is
without classes concept there is no java program [Link] java programming
we have two types of classes they are
Concrete class
Abstract class
Constructor And Its Types
A constructor is a special member method which will be called implicitly
(automatically) by the JVM whenever an object is created for placing user or
programmer defined values in place of default values. In a single word
constructor is a special member method which will be called automatically
whenever object is created.
The purpose of constructor is to initialize an object called object initialization.
Constructors are mainly create for initializing the object. Initialization is a
process of assigning user defined values at the time of allocation of memory
space.
Types of constructors
Based on creating objects in Java constructor are classified in two types. They
are
Default or no argument Constructor
Parameterized constructor.
Static Block in Java
Static block is a set of statements, which will be executed by the JVM before
execution of main method. At the time of class loading if we want to perform
any activity we have to define that activity inside static block because static
block execute at the time of class loading.
In a class we can take any number of static block but all these static block will
be execute from top to bottom.
Relationship in Java
Type of relationship always makes to understand how to reuse the feature from
one class to another class. In java programming we have two types of
relationship they are.
Is-A Relationship
Has-A Relationship
JAVA OBJECT ORIENTED
Inheritance
The process of obtaining the data members and methods from one class to
another class is known as inheritance. It is one of the fundamental features of
object-oriented programming.
A class that is declared with abstract keyword, is known as abstract class. An
abstract class is one which is containing some defined method and some
undefined method. In java programming undefined methods are known as un-
Implemented or abstract [Link] process of obtaining the data members
and methods from one class to another class is known
as inheritance. It is one of the fundamental features of object-oriented
programming.
Types of Inheritance
Single inheritance
Hierarchical inheritance
Multilevel inheritance
Why use Inheritance ?
For Method Overriding (used for Runtime Polymorphism).
It’s main uses are to enable polymorphism and to be able to reuse code
for different classes by putting it in a common super class
For code Re-usability
Method Overloading
Whenever same method name is exiting multiple times in the same class with
different number of parameter or different order of parameters or different types
of parameters is known as method overloading.
Why method Overloading ?
Suppose we have to perform addition of given number but there can be any
number of arguments, if we write method such as a(int, int)for two arguments,
b(int, int, int) for three arguments then it is very difficult for you and other
programmer to understand purpose or behaviors of method they can not identify
purpose of method. So we use method overloading to easily figure out program.
For example above two methods we can write sum(int, int) and sum(int, int, int)
using method overloading concept.
Different ways to overload the method
There are two ways to overload the method in java
By changing number of arguments or parameters
By changing the data type
By changing the order of arguments.
Method Overriding
Whenever same method name is existing in both base class and derived class
with same types of parameters or same order of parameters is known as method
Overriding.
Advantage of Java Method Overriding
Method Overriding is used to provide specific implementation of a
method that is already provided by its super class.
Method Overriding is used for Runtime Polymorphism.
Interface
Interface is similar to class which is collection of public static final variables
(constants) and abstract methods. The interface is a mechanism to achieve fully
abstraction in java. There can be only abstract methods in the interface. It is
used to achieve fully abstraction and multiple inheritance in Java.
Why we use Interface ?
It is used to achieve fully abstraction.
By using Interface, you can achieve multiple inheritance in java
When we use abstract and when Interface
If we do not know about any things about implementation just we have
requirement specification then we should be go for Interface
If we are talking about implementation but not completely (partially
implemented) then we should be go for abstract.
Abstraction
Abstraction is the concept of exposing only the required essential characteristics
and behaviour with respect to a context.
Hiding of data is known as data abstraction. In object oriented programming
language this is implemented automatically while writing the code in the form
of class and object.
Real life example of Abstraction
Abstraction shows only important things to the user and hides the internal
details for example when we ride a bike, we only know about how to ride bike
but can not know about how it work ? and also we do not know internal
functionality of bike.
Encapsulation
Encapsulation is a process of wrapping of data and methods in a single unit is
called encapsulation. Encapsulation is achieved in java language by class
concept. Combining of state and behaviour in a single container is known as
encapsulation. In java language encapsulation can be achieve using class
keyword, state represents declaration of variables on attributes and behaviour
represents operations in terms of method.
Benefits of encapsulation
Provides abstraction between an object and its clients.
Protects an object from unwanted access by clients.
Example: A bank application forbids (restrict) a client to change an
Account’s balance
Polymorphism
The process of representing one form in multiple forms is known as
[Link] original form or original method always resides in base
class and multiple forms represents overridden method which resides in derived
classes.
Polymorphism is not a programming concept but it is one of the principal of
OOPs. For many objects oriented programming language polymorphism
principle is common but whose implementations are varying from one objects
oriented programming language to another object oriented programming
language.
Polymorphism principal is divided into two sub principal they are:
Static or Compile time polymorphism
Dynamic or Runtime polymorphism
JAVA ADVANCED
Package
A package is a collection of similar types of classes, interfaces and sub-
packages. Purpose of package
The purpose of package concept is to provide common classes and interfaces for
any program separately. In other words if we want to develop any class or
interface which is common for most of the java programs than such common
classes and interfaces must be place in a package.
Exception Handling
The process of converting system error messages into user friendly error
message is known as Exception handling. This is one of the powerful feature of
Java to handle run time error and maintain normal flow of java application.
An Exception is an event, which occurs during the execution of a program, that
disrupts the normal flow of the program’s Instructions.
Type of Exception
Checked Exception
Un-Checked Exception
String
String is a sequence of characters enclosed within double quotes (“ “) is known
as String. Example: “Java Programming”.
In java programming to store the character data we have a fundamental
datatype called char. Similarly to store the string data and to perform various
operation on String data, we have three predefined classes they are:
String
StringBuffer
StringBuilder
Collection
Collections in java is a framework that provides an architecture to store and
manipulate the group of [Link] the operations that you perform on a data
such as searching, sorting, insertion, manipulation, deletion etc. can be
performed by Java [Link] Collection simply means a single unit of
objects. Java Collection framework provides many interfaces (Set, List, Queue,
Deque etc.) and classes (ArrayList, Vector, LinkedList, PriorityQueue, HashSet,
LinkedHashSet, TreeSet etc).
PROJECT UNDERTAKEN
E – Health Care Management System – JAVA based with backend
controlled by JDBC. E-Health care management system is command-driven
application that helps to manage the record of the patient's as well as generate
their hospital bills.
JDBC (Java Database Connectivity) is uses for connect java application with
database. It is Java SE technology, which is install automatically with the JDK
software. JDBC is an API (Application programming interface) used to
communicate Java application to database in database independent and platform
independent manner. It provides classes and interfaces to connect or
communicate Java application with database.
Input From User:
Password to access the Portal.(hello)
It provides six different options to choose :
1. Add new patient record
2. Add Diagnosis information
3. History of the patient
4. Bill of the patient
5. Help
6. Exit
If you selected option 1 then It will show you following options :
1. Enter patient’s file name
2. Name of patient
3. Address
4. Contact Number
5. Age
6. Gender
7. Blood group
8. Any major disease suffered earlier
9. Patient ID
If you selected option 2 then It will show you following options:
1. Enter patient’s file name to be opened
2. Doctor appointed
3. Symptoms
4. Diagnosis
5. Medicines
6. Admission required ?
If you selected option 3 then It will show you following options:
1. Enter the patient’s file name to be opened
2. Full Medical History of the Patient
If you selected option 4 then It will show you following options:
1. No. of days stayed
2. Ward charges / day
3. Doctor’s fee
4. Service charge
5. Total Bill
If you selected option 5 then It will show you following options:
1. E-Health care management system is command-driven
application that helps to manage the record of the patient’s as
well as generate their hospital bills.
2. A Table that describes all the options provided for the
user/patient convenience.
If you selected option 6 then you will be existed from the E health care
management portal.
Some Snapshots
OUTPUTS
CONCLUSIONS
Practical knowledge means the visualization of the knowledge, which we read
in our books. For this, we perform experiments and get observations. Practical
knowledge is very important in every field. One must be familiar with the
problems related to that field so that he may solve them and become a
successful person.
After achieving the proper goal in life, an engineer has to enter in
professional life. According to this life, he has to serve an industry, may be
public or private sector or self-own. For the efficient work in the field, he must
be well aware of the practical knowledge as well as theoretical knowledge.
Due to all above reasons and to bridge the gap between theory and
practical, our Engineering curriculum provides a practical training of
45 days. During this period a student work in the industry and get
well all type of experience and knowledge about the working of
companies and hardware and software tools.
I have undergone my 45 days summer training in 3rd semester at
INTERNSHALA .This report is based on the knowledge, which I acquired
during my 45 days of summer training.