Online Mobile Recharge
Online Mobile Recharge
Online Mobile Recharge
OF
SUMMER TRAINING
UNDERTAKEN AT
NOVEM CONTROLS PVT. LTD. ( MOHALI )
ON
OF
BACHELOR OF TECHNOLOGY
IN
PUNJABI UNIVERSITY
PATIALA-147002
TRAINING CERTIFICATE
Image certificate
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
CANDIDATE’S DECLARATION
I …………………………..hereby declare that I have undertaken Summer training at
NOVEM CONTROLS PVT. LTD. (MOHALI) during period from 15 June 2023 to
30 July 2023 in partial fulfillment of requirements for the award of the degree of
B. Tech (Department of Computer Science & Engineering) at Punjabi University, Patiala.
The work which is being presented in the training report submitted to Department of
Computer Science & Engineering at Punjabi University, Patiala is an authentic record of
training work.
Candidate’s Signature
Signature of Examiner
COMPANY PROFILE
NOVEM is a leading system engineering and integration company in India, offering application
design, development, testing services and asset-based solutions in niche segments through turnkey
projects for mission critical systems. NOVEM has also been expanding its service presence in
international markets offering off shoring advantages and delivering value through service level-based
and project scope-based deliveries.
Since its inception on March 2004, 2004, NOVEM has been a frontrunner in providing
IT solutions and services.
NOVEM continues to bring the benefits of IT to improve the productivity of its customers globally
and enhance the quality of its products and services by combining its wide range of service offerings
with its deep vertical experience in multiple industries. NOVEM mission is to deliver turnkey
solutions to solve complex business and societal problems using technology & innovation.
Today, NOVEM CONTROLS, an ISO 9001:2000 certified organization, is positioned as
a premier IT solutions provider in the fast growing and competitive IT market. It
executes large and complex turnkey projects, and has built, managed and supported its customer's IT
systems across the value chain of infrastructure, applications and business processes.
NOVEM Controls a software company is managed by a team of dedicated, committed and highly
qualified software & hardware professional in the fields of Software, Hardware and Web
Technologies.
One of the areas of our specializations is Project study, analysis, development and its live
implementation. Our Engineers has hands-on experience in software development and has a proven
track record in training and guiding the students.
ABSTRACT
Online mobile recharge has become an integral part of modern lifestyles, enabling users
to conveniently top up their mobile phone balances from anywhere, at any time. This
abstract provides an overview of the concept of online mobile recharge, its significance,
the underlying technology, benefits, challenges, and future prospects.
The proliferation of smartphones and the increasing dependence on mobile communication have
led to a surge in demand for quick and efficient mobile recharge methods. Online mobile recharge
offers users the convenience of recharging on-the-go, thus enhancing their connectivity
and communication experiences.
ACKNOWLEDGEMENT
Acknowledgement is an endless ocean and one requires the satisfying, supporting, guiding,
inspiring and constructively criticizing several specialists in order to drive out a handful
pearls from its depth. As this comes wordlessly it can’t be acknowledged in words. I am
greatly obliged to NOVEM CONTROLS PVT. LTD. institute for providing me this
opportunity to take up this project as long as platform to learn and enhance my professional
skill. I would like to express my deep sense of gratitude to MR. CHURAMANI SHARMA,
my corporate guide, for his kind help and support and valuable guidance throughout the
project. I am thankful to him for providing me with necessary insights and helping me out at
every single step.
Name:-
Qualification:-
Roll no :-
TABLE OF CONTENTS
Contents
Chapter 1: Introduction
1.1 Java Intro
1.2 Java Features
1.3 Java Syntax
1.4 Java Output
1.5 Java User Input
1.6 Java Comments
1.7 Java Variables
1.8 Java Data Types
1.9 Java Type Casting
1.10 Java Operators
1.11 Java Strings
1.12 Java Math & Java Booleans
1.13 Java Conditional Statements
1.14 Java Switch Statement
1.15 Java Loops
1.16 Java Break/Continue
1.17 Java Arrays
1.18 Java Methods
1.19 Java Method Parameters
1.20 Java Method Overloading
1.21 Java Scope
1.22 Java OOP
1.23 Java Classes/Objects
1.24 Java Class Methods
1.25 Java Constructors
1.26 Java Encapsulation
1.27 Java Inheritance
1.28 Java Polymorphism
1.29 Java Abstraction
Chapter 2: Training Work Undertaken
2.1 Introduction to Project: Brick Breaker Game
2.2 Game Concept
2.3 Key Features
2.4 Objectives & Gameplay
Chapter 4: Conclusion
References
CHAPTER 1
INTRODUCTION
1.1 Java Intro Java is a programming language created by James Gosling from Sun
Microsystems (Sun) in 1991. The target of Java is to write a program once and then
run this program on multiple operating systems. The first publically available
version of Java (Java 1.0) was released in 1995. Sun Microsystems was acquired by
the Oracle Corporation in 2010. Oracle has now the stearmanship of Java. More than
3 billion devices run Java. Java is defined by a specification and consists of
programming language, a compiler, core libraries and runtime (Java virtual
machine). The Java runtime allows software developers to write program code in
other languages than the Java programming language which still runs on the Java
virtual machine. The Java platform is usually associated with the Java virtual
machine and the Java core libraries.
1.2 JAVA FEATURES:
.Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.)
.ucadisdqadqoihwd
It is one of the most popular programming language in the world
It has a large demand in the current job market
It is easy to learn and simple to use
It is open-source and free
It is secure, fast and powerful
It has a huge community support (tens of millions of developers)
Java is an object oriented language which gives a clear structure to programs and allows code to be reused, lo
As Java is close to C and C#, it makes it easy for programmers to switch to Java.
Example explained
Every line of code that runs in Java must be inside a class. In our example, we named the
class Main. A class should always start with an uppercase first letter.
The name of the java file must match the class name. When saving the file, save it using the
class name and add ".java" to the end of the filename. The output should be:
The main() method is required and you will see it in every Java program. Any code inside
the main() method will be executed.
System.out.println()
Inside the main() method, we can use the println() method to print a line of text to the screen
Note: The curly braces {} marks the beginning and the end of a block of code.
System is a built-in Java class that contains useful members, such as out, which is short for
"output". The println() method, short for "print line", is used to print a value to the screen (or
a file).
Print Text
We can use the println() method to output values or print text in Java:
System.out.println(“Hello World”);
We can add as many println() methods as you want. It will add new line for each method.
Double Quotes
When you are working with text, it must be wrapped inside double quotations marks "".If
you forget the double quotes, an error occurs:
There is also a print() method, which is similar to println(). The only difference is that it does
not insert a new line at the end of the output.
Print Numbers
You can also use the println() method to print numbers. However, unlike text, we don't put
numbers inside double quotes:
System.out.println(3);
You can also perform mathematical calculations inside the println() method:
System.out.println(3+3);
1.4 JAVA USER INPUT: The Scanner class is used to get user input, and it is
found in the java.util package. To use the Scanner class, create an object of the
class and use any of the available methods found in the Scanner class
documentation. In our example, we will use the nextLine() method, which is used to
read Strings:
class Main{
1.6 JAVA COMMENTS: Comments can be used to explain Java code, and to make
it more readable. It can also be used to prevent execution when testing alternative code.
Single-line Comments: Single-line comments start with two forward slashes (//).Any
text between // and the end of the line is ignored by Java (will not be executed).
Java Multi-line Comments: Multi-line comments start with /* and ends with */. Any
text between /* and */ will be ignored by Java.
1.7 JAVA VARIABLES: Variables are containers for storing data values. In Java, there
are different types of variables, for example:
String - stores text, such as "Hello". String values are surrounded by double quotes
int - stores integers (whole numbers), without decimals, such as 123 or -123
float - stores floating point numbers, with decimals, such as 19.99 or -19.99
char - stores single characters, such as 'a' or 'B'. Char values are surrounded by single
quotes
boolean - stores values with two states: true or false
Declaring (Creating) Variables: To create a variable, you must specify the type and
assign it a value:
Where type is one of Java's types (such as int or String), and variableName is the name of
the variable (such as x or name). The equal sign(=) is used to assign values to the variable.
Example:
int myNum;
myNum=15;
System.out.println(myNum);
Final Variables
If you don't want others (or yourself) to overwrite existing values, use the final keyword
(this will declare the variable as "final" or "constant", which means unchangeable and read-
only).
myNum=15; //will generate error as we declare variable name with final keyword
Float myFloatNum=5.99f;
Char myLetter=’D’;
Boolean myBool=true;
String myText=”Hello”;
Display Variables: The println() method is often used to display variables. To combine
both text and a variable, use the + character:
System.out.println(name+” Sharma”);
For numeric values, the + character works as a mathematical operator (notice that we
use int (integer) variables here):
One Value to Multiple Variables: You can also assign the same value to multiple
variables in one line:
Example: int x, y, z;
x=y=z=50;
System.out.println(x+y+z);
Identifiers: All Java variables must be identified with unique names. These unique
names are called identifiers. Identifiers can be short names (like x and y) or more
descriptive names (age, sum, totalVolume).
int m=60; //it is Ok, but it is not easy to understand what “m” actually
1.8 JAVA DATA TYPES: Data types are divided into two groups:
Primitive data types - includes byte, short, int, long, float, double, boolean and char
Non-primitive data types - such as String, Arrays and Classes.
Numbers: Primitive number types are divided into two groups: Integer types stores whole
numbers, positive or negative (such as 123 or -456), without decimals. Valid types
are byte, short, int and long. Which type you should use, depends on the numeric value.
Floating point types represents numbers with a fractional part, containing one or more
decimals. There are two types: float and double.
Integer Types
Byte: The byte data type can store whole numbers from -128 to 127. This can be used
instead of int or other integer types to save memory when you are certain that the value will
be within -128 and 127.
Short: The short data type can store whole numbers from -32768 to 32767.
Int: The int data type can store whole numbers from -2147483648 to 2147483647.
In general, and in our tutorial, the int data type is the preferred data type when we
create variables with a numeric value.
Long: The long data type can store whole numbers from -9223372036854775808 to
9223372036854775807. This is used when int is not large enough to store the value. Note
that you should end the value with an "L".
Floating Point Types
You should use a floating point type whenever you need a number with a decimal, such as
9.99 or 3.14515. The float and double data types can store fractional numbers. Note that
you should end the value with an "f" for floats and "d" for doubles.
Scientific Numbers:
ABoolean Types:
floating point number
Verycan alsoinbeprogramming,
often a scientific number with
you will an a"e"
need to indicate
data type thatthe
canpower
only of 10 one of two valu
YES / NO
ON / OFF
TRUE / FALSE
For this, Java has a boolean data type, which can only take the values true or false.
Characters: The char data type is used to store a single character. The character must be
surrounded by single quotes, like 'A' or 'c'
Strings: The String data type is used to store a sequence of characters (text). String values
must be surrounded by double quotes.
1.9 JAVA TYPE CASTING: Type casting is when you assign a value of one primitive
data type to another type. In Java, there are two types of casting:
Arithmetic operators
Assignment operators
Comparison operators
Logical operators
Bitwise operators
Comparison Operators: Comparison operators are used to compare two values (or
variables). This is important in programming, because it helps us to find answers and make
decisions. The return value of a comparison is either true or false. These values are known
as Boolean values. Example: ==, !=, >, <, >=, <=
Logical Operators: You can also test for true or false values with logical operators. Logical
operators are used to determine the logic between variables or values.
String Length: A String in Java is actually an object, which contain methods that can
perform certain operations on strings. For example, the length of a string can be found with
the length() method.
Example: String txt=”Good Morning”;
More String Methods: There are many string methods available, for example
toUpperCase() and toLowerCase()
Finding a Character in a String: The indexof() method returns the index (the position) of
the first occurrence of a specified text in a string (including whitespace).
String Concatenation: The + operator can be used between strings to combine them. This is
called concatenation. You can also use the concat() method to concatenate two strings
1.12 JAVA MATH & BOOLEANS: The Java Math class has many methods
that allows you to perform mathematical tasks on numbers.
Math.max(x,y): The Math.max(x,y) method can be used to find the highest value
of x and y:
Example: Math.max(5,10);
Math.min(x,y): The Math.min(x,y) method can be used to find the lowest value of x and y:
Example: Math.min(5,10);
Java Booleans: Very often, in programming, you will need a data type that can only have
one of two values, like:
YES / NO
ON / OFF
TRUE / FALSE
For this, Java has a boolean data type, which can store true or false values.
Boolean Values: A boolean type is declared with the boolean keyword and can only take the
values true or false:
Boolean Expression: A Boolean expression returns a boolean value: true or false. This is
useful to build logic, and find answers. For example, you can use a comparison operator,
such as the greater than (>) operator, to find out if an expression (or a variable) is true or
false. Example: int x=10, y=9;
System.out.println(x>y);
The if Statement: Use the if statement to specify a block of Java code to be executed if a
condition is true.
Syntax: if(condition){ Example: if(20>18){
} }
The else Statement: Use the else statement to specify a block of code to be executed if the
condition is false.
Syntax: if(condition){ Example: int time=20;
} System.out.println(“Good Evening”); }
The else if Statement: Use the else if statement to specify a new condition if the first
condition is false.
Syntax: if(condition 1){ Example: int time=30;
} System.out.println(“Good evening”); }
Short Hand If...Else: There is also a short-hand if else, which is known as the ternary
operator because it consists of three operands. It can be used to replace multiple lines of code
with a single line, and is most often used to replace simple if else statements:
Syntax: variable=(condition) ? expressionTrue : expressionFalse;
Example:
int day = 4;
switch (day) {
case 1:
System.out.println("Monday");
break;
case 2:
System.out.println("Tuesday");
break;
case 3:
System.out.println("Wednesday");
break;
case 4:
System.out.println("Thursday");
break;
case 5:
System.out.println("Friday");
break;
case 6:
System.out.println("Saturday");
break;
case 7:
System.out.println("Sunday");
break;
}
The default Keyword: The default keyword specifies some code to run if there is no case
match
1.15 JAVA LOOPS: Loops can execute a block of code as long as a specified condition
is reached. Loops are handy because they save time, reduce errors, and they make code more
readable.
Java While Loop: The while loop loops through a block of code as long as a specified
condition is true.
Syntax: while (condition) {
// code block
}
Example: int i=0;
while (i<5) {
System.out.println(i);
i++; }
Java For Loop: When you know exactly how many times you want to loop through a block
of code, use the for loop instead of a while loop.
Syntax: for (statement 1,; statement 2; statement 3) {
// code block
}
Statement 1 is executed (one time) before the execution of the code block.
Statement 2 defines the condition for executing the code block.
Statement 3 is executed (every time) after the code block has been executed.
Nested Loops: It is also possible to place a loop inside another loop. This is called a nested
loop. The "inner loop" will be executed one time for each iteration of the "outer loop".
For-Each Loop: There is also a "for-each" loop, which is used exclusively to loop through
elements in an array
Syntax: for (type variable_name: array_name) {
// code block
}
Example: String[] cars= {“Volvo”, “Audi”, “Ford”};
for (String i: cars) {
System.out.println(i);
}
1.16JAVA BREAK/CONTINUE:
Java Break: The break statement is used to "jump out" of a switch statement.
The break statement can also be used to jump out of a loop.
Example: for(int i=0; i<10; i++) {
if (i==4) {
break;
}
System.out.println(i);
}
Java Continue: The continue statement breaks one iteration (in the loop), if a specified
condition occurs, and continues with the next iteration in the loop.
Example: for (int i=0; i<10; i++)
if (i==4) {
continue;
}
System.out.println(i);
}
1.17 JAVA ARRAYS: Arrays are used to store multiple values in a single variable,
instead of declaring separate variables for each value. To declare an array, define the variable
type with square brackets.
To create an array of integers, you could write:
int[] myNum= {10, 20, 30, 40};
To create an array of strings:
String[] cars={“Volvo”, “Audi”, “Swift”};
Access the Elements of an Array: You can access an array element by referring to the
index number. This statement accesses the value of the first element in cars.
Example: String[] cars={“Volvo”, “Audi”, “Swift”};
System.out.println(cars[0]);
Change an Array Element: To change the value of a specific element, refer to the index
number.
Example: String[] cars={“Volvo”, “Audi”, “Swift”};
cars[0]=”Swift”;
System.out.println(cars[0]);
Array Length: To find out how many elements an array has, use the length property.
Example: String[] cars={“Volvo”, “Audi”, “Swift”};
System.out.println(cars.length);
Loop Through an Array: You can loop through the array elements with the for loop, and
use the length property to specify how many times the loop should run.
Example: String[] cars={“Volvo”, “Audi”, “Swift”};
for(int i=0; i<cars.length; i++) {
System.out.println(cars.length);
}
Loop Through an Array with For-Each: There is also a "for-each" loop, which is used
exclusively to loop through elements in arrays.
Example: String[] cars={“Volvo”, “Audi”, “Swift”};
for(String i: cars) {
System.out.println(i);
}
1.18 JAVA METHODS: A method is a block of code which only runs when it is called.
You can pass data, known as parameters, into a method.
Methods are used to perform certain actions, and they are also known as functions.
Why use methods? To reuse code: define the code once, and use it many times.
Create a Method: A method must be declared within a class. It is defined with the name of
the method, followed by parentheses (). Java provides some pre-defined methods, such
as System.out.println(), but you can also create your own methods to perform certain actions
Example: public class Main {
static void myMethod() {
// code to be executed
}
}
Call a Method: To call a method in Java, write the method's name followed by two
parentheses () and a semicolon;
Return Values: The void keyword, used in the examples above, indicates that the method
should not return a value. If you want the method to return a value, you can use a
primitive data type (such as int, char, etc.) instead of void, and use the return keyword
inside the method
Example: public class Main {
static int myMethod(int x, int y) {
return x + y;
}
public static void main(String[] args) {
System.out.println(myMethod(5, 3));
}
} // Outputs 8 (5 + 3)
1.21 JAVA SCOPE: In Java, variables are only accessible inside the region they
are created. This is called scope.
Method Scope: Variables declared directly inside a method are available anywhere in the
method
Block Scope: A block of code refers to all of the code between curly braces {}. Variables
declared inside blocks of code are only accessible by the code between the curly braces,
which follows the line in which the variable was declared.
Java Class Attributes: In the previous example, we used the term "variable" for x in the
example (as shown below). It is actually an attribute of the class. Or you could say that class
attributes are variables within a class:
Example: public class Main {
int x = 5;
int y = 3;
}
Accessing Attributes: You can access attributes by creating an object of the class, and by
using the dot syntax (.)
Modify Attributes: You can also modify attribute values or override the existing values:
Example: Set the value of x to 40:
public class Main {
int x=10;
public static void main(String[] args) {
Main myObj = new Main();
myObj.x = 40;
System.out.println(myObj.x);
}
}
1.24 JAVA CLASS METHODS: Methods are declared within a class, and that
they are used to perform certain actions.
Example: public class Main {
static void myMethod() {
System.out.println("Hello World!");
}
public static void main(String[] args) {
myMethod();
}
}
Static vs. Public:You will often see Java programs that have either static or public attributes
and methods. In the example above, we created a static method, which means that it can be
accessed without creating an object of the class, unlike public, which can only be accessed
by objects.
Note: Constructor name must match the class name, and it cannot have a return
type (like void). Also note that the constructor is called when the object is created. All
classes have constructors by default: if you do not create a class constructor yourself, Java
creates one for you. However, then you are not able to set initial values for object
attributes.
Constructor Parameters: Constructors can also take parameters, which is used to initialize
attributes. The following example adds an int y parameter to the constructor. Inside the
constructor we set x to y (x=y). When we call the constructor, we pass a parameter to the
constructor (5), which will set the value of x to 5:
Example: public class Main {
int x;
public Main(int y) {
x = y;
}
public static void main(String[] args) {
Main myObj = new Main(5);
System.out.println(myObj.x);
}
} // Outputs 5
Get and Set: private variables can only be accessed within the same class (an outside class
has no access to it). However, it is possible to access them if we provide
public get and set methods. The get method returns the variable value, and the set method
sets the value. Syntax for both is that they start with either get or set, followed by the name
of the variable, with the first letter in upper case.
Why Encapsulation?
To inherit from a class, use the extends keyword. In the example below, the Car class
(subclass) inherits the attributes and methods from the Vehicle class (superclass)
Why And When To Use "Inheritance"?
- It is useful for code reusability: reuse attributes and methods of an existing class when you
create a new class.
Example: class Vehicle {
protected String brand = "Ford"; // Vehicle attribute
public void honk() { // Vehicle method
System.out.println("Tuut, tuut!");
}
}
class Car extends Vehicle {
private String modelName = "Mustang"; // Car attribute
public static void main(String[] args) {
Car myCar = new Car(); // Create a myCar object
// Call the honk() method (from the Vehicle class) on the myCar object
myCar.honk();
/* Display the value of the brand attribute (from the Vehicleclass) and the value of the
modelName from the Car class*/
System.out.println(myCar.brand + " " + myCar.modelName);
}
}
The final Keyword: If you don't want other classes to inherit from a class, use
the final keyword.
1.29 JAVA ABSTRACTION: Data abstraction is the process of hiding certain details
and showing only essential information to the user.
Abstraction can be achieved with either abstract classes or interfaces
The abstract keyword is a non-access modifier, used for classes and methods:
Abstract class: is a restricted class that cannot be used to create objects (to access it,
it must be inherited from another class).
Abstract method: can only be used in an abstract class, and it does not have a body.
The body is provided by the subclass (inherited from).
Methodology:
The project will involve the development of a web-based application that connects with various payment
gateways and mobile network operator APIs. The application will provide a user registration and login
system, allowing users to select their mobile operator, choose a recharge plan, make secure payments,
and receive instant confirmations.
Conclusion:
"Online Mobile Recharge" is poised to revolutionize the way individuals manage their mobile balances,
catering to the demands of an increasingly interconnected world. By offering an efficient, secure, and
user-centric platform, the project aims to redefine the mobile recharge experience and empower users
with the freedom to stay connected on their terms.
Snapshots of the Game Code:
import java.util.Scanner;
class MobileRechargeService {
public boolean processPayment(double amount) {
// Simulate payment processing
// You can integrate with a real payment gateway here
return true;
}
scanner.close();
rechargeService.rechargeMobile(mobileNumber, amount);
}
}
CHAPTER 3
RESULTS AND DISCCUSSIONS
3.1 RESULTS:
Remember that the availability of features and services might vary based on the specific
online recharge platform you use and the region you are in. It's always a good idea to do
some research and choose a reliable and well-reviewed platform for your online mobile
recharge needs.
CHAPTER 4
CONCLUSION
online mobile recharge has revolutionized the way we manage our mobile connections. Its
convenience, flexibility, and wide range of options have made it a preferred choice for millions of
users around the world. With the ability to recharge anytime, anywhere, users can stay connected
without the hassle of visiting physical stores or dealing with scratch cards. The variety of payment
methods, offers, and discounts further enhance the appeal of online recharge platforms.
However, it's important to exercise caution while using online recharge services. Stick to reputable
platforms that ensure data security and privacy. Always verify the authenticity of the platform before
entering any personal or financial information.
As technology continues to advance, online mobile recharge is likely to become even more seamless
and integrated into our daily lives. Whether it's topping up your own balance or helping a friend in
need, online mobile recharge offers a convenient solution for staying connected in today's digital age.
REFERENCES:
https://www.w3schools.com/
https://www.javatpoint.com/
Book: Head First Java by Kathy Sierra & Bert Bates
https://youtu.be/gPiahyf70ds?si=Rh4lw73RhiA2Msg2