Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

A

Micro project

On

“Calculate Area Of Any Type Of Shape Using Abstract Class.”

Submitted By

Sneha Ohol (17)


Madhura Pansare (19)

Guided By:

Ms. S.Boharpi

Diploma Course in Computer

Technology (As per directives of I

Scheme, MSBTE)

Sinhgad Institutes

Sinhgad Technical Education Society’s

SOU.VENUTAI CHAVAN

POLYTECHNIC PUNE - 411041

ACADEMIC YEAR 2020-2021


Maharashtra State Board of
Technical Education
Certificate
This is to certify that Ms.Sneha Ohol with Roll No. 17 of Semester IV of
Diploma in Computer Technology of Institute Sou. Venutai Chavan
Polytechnic (Code: 0040) has successfully completed the Micro-Project in
Java Programming (22412) for the academic year 2020-2021 as prescribed in
the curriculum.

Place: SVCP, Pune Enrollment No:

Date: 10-06-2021 Exam Seat No:

Ms.S. Boharpi Mrs.A.V.Kurkute Dr.(Mrs.) M.S. Jadhav


Subject Teacher HOD Principal
Maharashtra State Board of
Technical Education
Certificate
This is to certify that Ms.Madhura Pansare with Roll No. 19 of Semester IV
of Diploma in Computer Technology of Institute Sou. Venutai Chavan
Polytechnic (Code: 0040) has successfully completed the Micro-Project in
Java Programming (22412) for the academic year 2020-2021 as prescribed in
the curriculum.

Place: SVCP, Pune Enrollment No:

Date: 10-06-2021 Exam Seat No:

Ms.S. Boharpi Mrs.A.V.Kurkute Dr.(Mrs.) M.S. Jadhav


Subject Teacher HOD Principal
INDEX

SR NO CONTENTS PAGE NO

1 Aim of the Micro-Project 1

2 Rationale 3

3 Course Outcomes Achieved 3

4 Literature Review 4

5 Actual Methodology Followed 4

6 Actual Resources Used 5

7 Skills Developed 7

8 Applications of Micro Project 7


Java Programming - 22412 Calculate Area Of Any Type Of Shape Using Abstract Class.

Annexure - I

A Micro-Project Proposal

1.0 Aim of the Micro-Project:

Program To Calculate Area Of Any Type Of Shape Using Abstract Class.

2.0 Intended Course Outcomes:


a) Develop programs using Object-Oriented methodology in Java.

3.0. Proposed methodology:


I. Study the concept of JAVA programming.
II. Study various syntax and functions of JAVA.
III. Study to create small programs using JAVA.
IV. Make program for given criteria.
V. Prepare the final report.

1
Java Programming - 22412 Calculate Area Of Any Type Of Shape Using Abstract Class.

4.0 Action Plan:

Name of
Sr. Planned Planned
Details of Activity responsible
No. Start Date Finish Date
Team members
Identify the requirements of the
1 19/04/2021 27/04/2021 Madhura Pansare
project.

2 Design the structure of the project. 29/04/2021 07/05/2021 Sneha Ohol

Develop the program using in


3 10/05/2021 20/05/2021 Sneha Ohol
JAVA.
Debug code and eliminate errors
4 26/05/2021 04/06/2021 Madhura Pansare
occurred.

5 Test the project. 07/06/2021 14/06/2021 Sneha Ohol

6 Prepare the final report. 15/06/2021 19/06/2021 Madhura Pansare

5.0 Resources Required:

S. No. Resources required Specifications


1 Computer system Intel(R) Pentium CPU, RAM 4 GB
2 Operating System Windows 10, 64 Bit Operating System
3 Software’s Java JDK 15.02, Notepad++

6.0 Team members:

S. No. Roll. Number Name of Student


1 17 Sneha Ohol
2 19 Madhura Pansare

2
Java Programming - 22412 Calculate Area Of Any Type Of Shape Using Abstract Class.

Annexure - II

Micro-Project Report

1.0 Rationale:

Abstraction in JAVA shows only the essential attributes and hides unnecessary details
of the object from the user. In Java, abstraction is accomplished using Abstract class,
Abstract methods, and Interfaces. Abstraction helps in reducing programming
complexity and effort.
ABSTRACT CLASS is a type of class in Java, that declare one or more abstract
methods. These classes can have abstract methods as well as concrete methods. A normal
class cannot have abstract methods. An abstract class is a class that contains at least one
abstract method.

.
2.0 Aim of the Micro-Project:

Program To Calculate Area Of Any Type Of Shape Using Abstract Class.

3.0 Course Outcomes Achieved

a) Develop programs using Object-Oriented methodology in Java.

3
Java Programming - 22412 Calculate Area Of Any Type Of Shape Using Abstract Class.

4.0 Literature Review:

i. An abstract class may also have concrete (complete) methods.


ii. For design purpose, a class can be declared abstract even if it does not contain any abstract
methods:
iii. Reference of an abstract class can point to objects of its sub-classes thereby achieving run-
time polymorphism Ex: Shape obj = new Rectangle();
iv. A class must be compulsorily labelled abstract, if it has one or more abstract methods.

 Advantages of Abstraction:

i. Abstract class in Java is highly beneficial in writing shorter codes.


ii. Abstraction in Java avoids code duplication.
iii. Abstract classes enable code reusability.
iv. Changes to internal code implementation are done without affecting classes.

 Rules For Abstract Class in Java are as follows:

4
Java Programming - 22412 Calculate Area Of Any Type Of Shape Using Abstract Class.

5.0 Actual Methodology Followed:


i. Study the concept of JAVA programming.
ii. Study various syntaxes and functions of JAVA.
iii. Study to create small programs using JAVA.
iv. Study to use Abstraction in JAVA.
v. Make program for given criteria.
vi. Prepare final report.

6.0 Actual Resources Used:

S. No. Resources required Specifications


1 Computer system Intel(R) Pentium CPU, RAM 4 GB
2 Operating System Windows 10, 64 Bit Operating System
3 Software’s Java JDK 15.02, Notepad++

7.0 Source code of program:

import java.lang.Math;

abstract class Shape


{
abstract void area();
double area;
}

class Triangle extends Shape


{
double b=50,h=15;
void area()
{
area = (b*h)/2;
System.out.println("area of Triangle -->"+area);
}
}
5
Java Programming - 22412 Calculate Area Of Any Type Of Shape Using Abstract Class.

class Rectangle extends Shape


{
double w=70,h=20;
void area()
{
area = w*h;
System.out.println("area of Rectangle -->"+area);
}
}

class Circle extends Shape


{
double r=5;
void area()
{
area = Math.PI * r * r;
System.out.println("area of Circle -->"+area);
}
}

class Area
{
public static void main(String [] args)
{
Triangle t= new Triangle();
Rectangle r =new Rectangle();
Circle c =new Circle();

t.area();
r.area();
c.area();
}
}

8.0 Output:

6
Java Programming - 22412 Calculate Area Of Any Type Of Shape Using Abstract Class.

9.0 Skills Developed:


During the course of this micro-project, we learnt to create a program on area of
shapes using abstract class.

a) We learnt various syntaxes of Java language.


b) We learnt to create area of shape through abstract class.
c) We also learnt abstraction of a Class.

10.0 Applications of this Micro-project:


This micro-project finds its application in:

Abstraction in JAVA shows only the essential attributes and hides unnecessary details
of the object from the user. In Java, abstraction is accomplished using Abstract class,
Abstract methods, and Interfaces. Abstraction helps in reducing programming
complexity and effort.

11.0 Area of future Improvement:


For future, in a project specially for larger projects and many class files in a abstract
class can be created for different uses like in a main file for importing arithmetic
operations, classes can be created named arithmetic_operations in which different
class file for different operations like addition, subtraction, multiplication etc. can be
created and for string operations package named string_operation can be developed
for operations like reversing, finding length, concatenating etc. can be made.

12.0 Conclusion:
We learn to calculate area of various shape. Also, we developed a java file and learnt
various syntax in java.

You might also like