logo

Tax Calculator Java - Features, JVM, UML, Implementation, NetBeans IDE

   

Added on  2023-04-22

21 Pages3435 Words286 Views
Running head: TAX CALCULATOR JAVA
Tax Calculator Java
Name of the student:
Name of the University:
Author note:
Tax Calculator Java - Features, JVM, UML, Implementation, NetBeans IDE_1
1
TAX CALCULATOR JAVA
Table of Contents
LO1............................................................................................................................................2
1.1 Features of Java................................................................................................................2
1.2 Java Virtual Machine.......................................................................................................6
LO2............................................................................................................................................7
2.1 UML and Use Case..........................................................................................................7
2.2 Components and File Structure........................................................................................8
LO3............................................................................................................................................8
3.1 Implementation................................................................................................................8
3.2 Design Explanations.......................................................................................................11
3.4 Exception Handling and Error Reporting......................................................................12
3.5 NetBeans IDE.................................................................................................................13
LO4..........................................................................................................................................15
4.1 & 4.2 Testing and Analysis............................................................................................15
4.3 User Review...................................................................................................................17
4.5 Documentation...............................................................................................................19
Tax Calculator Java - Features, JVM, UML, Implementation, NetBeans IDE_2
2
TAX CALCULATOR JAVA
LO1
1.1 Features of Java
Java programming language has been developed by Sun Microsystem, initiated by
James Gosling in 1995 as a core component of Sun Microsystems, now owned by Oracle,
Java platform (Java 1.0 J2SE). There has been various updates in the Java. The latest release
of the Java Standard Edition is Java SE 9. Java has able to change the internet. An update in
Java has been applet that helped in connecting Java to the internet. An applet is a java
program that has been designed to transmit over the internet and execute a java compatible
web browser. Applet can be downloaded on the demand of user and used for displaying data
provided by the server. However, security and portability have been major issues in a
programming language. Therefore, java has been able to mitigate these issues by developing
byte code. A byte code is a highly optimized set of instruction that is executed by the Java
Runtime machine or Java Virtual Machine (JVM). JVM has been designed as an interpreter
for byte code. Following are the features of Java (Sebesta 2016):
Object Oriented Programming: Object oriented programming (OOP) has been the
core of the Java. OOP has been integral part if the Java. Therefore, the basic principles of the
OOP need to be understood before coding a Java program (Schmidt et al. 2013). The basic
features of the Object Oriented Programming have been mentioned below:
Robust: Robust refers strength of the object. Java is a robust program language as it
uses a strong memory management. There has been a lack of pointers that helps in avoiding
security problems. There has been an automatic garbage collection in Java that helps in
running on the Java Virtual Machine for getting rid of the objects and not being used by Java
application. There have been an exception handling and type checking mechanism in Java.
These [points have been helping in making Java a robust program.
Tax Calculator Java - Features, JVM, UML, Implementation, NetBeans IDE_3
3
TAX CALCULATOR JAVA
Platform Independent: Java is a platform independent program as it helps in executing
different languages including C, C++ and other languages that are compiled into platform
specific machines. A platform is a hardware or software environment on which a program
runs. Java helps in providing software-based platform. The platform of Java has been
different from other platforms as it runs on the top of other hardware based platforms. It
include two components inckudidng Runtime Environment and Application Programing
Interface (API). Java codes are compatible to run in various other platforms including
Windows, Linux, Sun Solaris and Mac/OS. Java code can be compiled by the compiler and
transformed into byte code (Morelli and Walde 2012). This byte code has been a platform
independent code as it can be complied over multiple platforms.
Multithreaded: A threaded is a separate program that execute concurrently. Java
programs deals with many tasks at a time by defining multiple threads (Kika and Greca
2013). The major benefit of multi-threading has been consumption of low memory and it
does not occupy memory for each and every thread. It shares a common memory space for
every thread. Threads have been important component for web applications and multimedia
(Czajkowski and Daynàs 2012).
Following are the principles of OOP:
Abstraction: Abstraction has been an essential element of object-oriented programing.
Abstraction can be used for minimizing complexity of any system. For example, people do
not think about the internal systems of a car. They only deals car as an object with its unique
behavior. They do not think about the way it operate including transmission and engine
operations. Similar to those, abstraction deals with the unique behavior of codes and
programs rather focusing on how it is working. Hierarchical abstractions of complex systems
are applied on computer programs. Data transferred from traditional process oriented
Tax Calculator Java - Features, JVM, UML, Implementation, NetBeans IDE_4
4
TAX CALCULATOR JAVA
program can be modified into abstraction and objects. A series of process steps have been
collected for messages between these objects. These objects used to describes its own unique
behavior and functionalities. Object oriented concepts have been related to the human
behavior in the real world. Therefore, concept of abstraction has been related to the
behavioral aspects of human beings in the real world. Abstraction help in minimizing the
complexity of programs and systems from user point of view.
Encapsulation: It is the mechanism that helps in binding codes together and
manipulate data. Encapsulation acts as protective layer for codes and data for being used
arbitrarily accessed by other set of codes in the program. In Java, basis of encapsulation is the
class. Class is defined as behavior and structure that is shared with various objects. Each
variable in the program can be marked as public and private. The public interface of class
refers everything that an external user need to know about the program (Koscielny et al.
2014). The private methods and data can only be accessed by member of the class.
Therefore, codes that are outside of that class, cannot access a private method. This help in
ensuring security to the data and codes.
class Account {
private int account_number;
private int account_balance;
public void show Data() {
//code to show data
}
public void deposit(int a) {
if (a < 0) {
//show error
} else
account_balance = account_balance + a;
}
Tax Calculator Java - Features, JVM, UML, Implementation, NetBeans IDE_5
5
TAX CALCULATOR JAVA
}
Inheritance: Inheritance is a process by which an object helps in acquiring properties
of another object. It has been one of the most important principles of the OOP. A hierarchical
order is followed in this principle. Inheritance interacts with encapsulation for providing
secured level of hierarchy in the program. Inheritance helps in minimizing the space
complexity of program and encourages reusability of codes. A platform is a hardware or
software environment on which a program runs. Java helps in providing software-based
platform. Java does not support multiple inheritance.
Polymorphism: Polymorphism refers to the mechanism of allowing one interface to
be used for a general class of actions. Polymorphism helps in designing a generic interface
for a group of related activities. Therefore, it reduces complexity of programs by allowing
same interface to be used by specify a general class of action.
class Shape{
void draw(){System.out.println("drawing...");}
}
class Rectangle extends Shape{
void draw(){System.out.println("drawing rectangle...");}
}
class Circle extends Shape{
void draw(){System.out.println("drawing circle...");}
}
class Triangle extends Shape{
void draw(){System.out.println("drawing triangle...");}
}
class TestPolymorphism2{
public static void main(String args[]){
Shape s;
s=new Rectangle();
Tax Calculator Java - Features, JVM, UML, Implementation, NetBeans IDE_6

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Features of Java | Object Oriented Programming in Java
|13
|1682
|142

Java Programming and Its Benefits
|24
|6942
|313

Quiz - An Android App for Entertainment and General Knowledge
|22
|1943
|273

Advanced Mobile Technology
|7
|935
|403

Research Paper on Programming Languages
|8
|2454
|39

Principles, Characteristics and Features of Programming in Java
|6
|1044
|398