0% found this document useful (0 votes)
15 views36 pages

Computer Project

This document is a project on mensuration created by Debopam Banerjee for ICSE 2022-2023, detailing the use of Java programming to perform calculations related to geometric quantities. It includes sections on acknowledgements, an introduction to Java, and various mensuration calculations for different shapes such as circles, cubes, and rectangles. The project aims to demonstrate the practical application of mensuration in daily life and enhance understanding of Java programming.

Uploaded by

tapaskumarmahato
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views36 pages

Computer Project

This document is a project on mensuration created by Debopam Banerjee for ICSE 2022-2023, detailing the use of Java programming to perform calculations related to geometric quantities. It includes sections on acknowledgements, an introduction to Java, and various mensuration calculations for different shapes such as circles, cubes, and rectangles. The project aims to demonstrate the practical application of mensuration in daily life and enhance understanding of Java programming.

Uploaded by

tapaskumarmahato
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

COMPUTER

APPLICATION
PROJECT
ICSE 2022 – 2023

Work On Mensuration

BY: -Debopam Banerjee


CLASS: X(Unique ID-7781615)
ACKNOWLEDGEMENT
I acknowledge this project to Fr.Sahaya Thason, the principal for
giving this opportunity to make this project.

I am also grateful to our teacher Sabyasachi Sir. I cannot ignore the


help given by Father, Fr.Sahaya Thason without whom it would
have been impossible for me to do the project. My friends also helped
me a lot by giving the required information and advising me how to
get the other information.

Our School Librarian also helped me a lot by providing the necessary


books in time. It's been a roller-coaster throughout developing this
project. I enjoyed much. Moreover, it has given me a sharping edge
over Java Programming. I am heartily thankful to all around me for
this project.

Name – Debopam Banerjee


Class – X
INTRODUCTION TO JAVA
Java is an object-oriented programming language developed initially
for consumer electronics. It was primarily developed by James A.
Gosling and colleagues at Sun Micro Systems. It is a multithreaded
language and can access data from a local system as well as net. Java
program can create Applets and Applications as general programs
like any other programming languages. Java does not require any
preprocessor or inclusion of header files for creating a java
application program. It is a case sensitive language. Java
programming is written within a class. The variables and functions
are declared and defined with the class. Platform Independence is the
most import characteristic of Java that distinguishes it from most
other programming languages.
TABLE OF CONTENTS

1 About Mensuration 5

2 Program Statement 6

3 Program Listing 6-16

4 Sample Output 17-22

5 Variable 23

6 Conclusion 24

7 Bibliography 25
About Mensuration

The calculation of geometric quantities such as length, area, and


volume from dimensions and angles that are already known is known
as mensuration.

Mensuration forms an integral part of mathematics.

Mensuration is extremely essential in our day-to-day life activities.


This program is a simple means to do mensuration.
PROGRAM STATEMENT
Create a Java application which generates a menu for the user

tochoose from the following options: -

Choice 1: Acknowledgement
Choice 2: Introduction to java
Choice 3: About Mensuration
Choice 4: Mensuration of circle
Choice 5: Mensuration of cube
Choice 6: Mensuration of cuboid
Choice 7: Mensuration of rectangle
Choice 8: Mensuration of square
Choice 9: Mensuration of cone
Choice 10: Mensuration of sphere
Choice 11: Mensuration of cylinder
Choice 12: Conclusion
Choice 13: Reference
Any Number other than the above for Exit
PROGRAM LISTING
import java.io.*;

class mensuration

int head()throws IOException

//FrontPage

int con=0;

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");

System.out.println("\t\t\t\t
**************************************************************");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * Project work on *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * Mensuration *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * By Taught By, *");

System.out.println("\t\t\t\t * Debopam Banerjee *");

System.out.println("\t\t\t\t * Std - 10, computer department *");

System.out.println("\t\t\t\t * Roll no. - 17, St.Xavier's School *");

System.out.println("\t\t\t\t * Regn. no - Purulia,W.B. *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * *");
System.out.println("\t\t\t\t
**************************************************************");

System.out.println("\n\n\n\n\n\n\n");
System.out.print("\t\t\t\t Enter your choice(1-Continue,Any other number-Quit) :");

con=Integer.parseInt(br.readLine());

return(con);

int contents()throws IOException

//Contents

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");

System.out.println("\t\t\t\t ************************************************************");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * Contents *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * 1. Acknowledgement *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * 2. Introduction to java *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * 3. About Mensuration *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * 4. Mensuration of circle *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * 5. Mensuration of cube *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * 6. Mensuration of cuboid *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * 7. Mensuration of rectangle *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * 8. Mensuration of square *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * 9. Mensuration of cone *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * 10. Mensuration of sphere *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * 11. Mensuration of cylinder *");


System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * 12. Conclusion *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * 13. Reference *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * Any Number other than the above for Exit *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t ************************************************************");

System.out.print("\n\n\n\n\t\t\t\t Enter the topic number to do the desired task :");

int ch=0;

ch=Integer.parseInt(br.readLine());

System.out.print("\n\n\n");

return(ch);

int acknowledgement()throws IOException

//Acknowledgement

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");

System.out.println("\t\t\t\t ************************************************************");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * Acknowledgement *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * I acknowledge this project to Fr.Eugene Ekka, *");

System.out.println("\t\t\t\t * the principal for giving this opportunity to make *");

System.out.println("\t\t\t\t * this project. I am also grateful to our teacher *");

System.out.println("\t\t\t\t * Sabyasachi Sir. I cannot ignore the help given by Father,*");

System.out.println("\t\t\t\t * Eugene Ekka without whom it would have been *");

System.out.println("\t\t\t\t * impossible for me to do the project. My friends also *");

System.out.println("\t\t\t\t * helped me a lot by giving the required informations *");

System.out.println("\t\t\t\t * and advising me how to get the other informations. *");

System.out.println("\t\t\t\t * Our School Librarian also helped me a lot by providing *");

System.out.println("\t\t\t\t * the necessary books in time. It's been a rollercoster *");

System.out.println("\t\t\t\t * throughout developing this project. I enjoyed much. *");


System.out.println("\t\t\t\t * Moreover it has given me a sharping edge over Java *");

System.out.println("\t\t\t\t * Programming.I am heartily thankful to all around *");

System.out.println("\t\t\t\t * me for this project. *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t ************************************************************");

System.out.println("\n\n\n\n\n\n\n");

System.out.print("\t\t\t\t Enter your choice(1-Main Menu,Any other number-Quit) :");

int con=0;

con=Integer.parseInt(br.readLine());

return(con);

int introduction()throws IOException

//Introduction to Java

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");

System.out.println("\t\t\t\t ************************************************************");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * Introduction to Java *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * Java is an object oriented programming language *");

System.out.println("\t\t\t\t * developed initially for consumer electronics. *");

System.out.println("\t\t\t\t * It was primarily developed by James A. Gosling *");

System.out.println("\t\t\t\t * and colleagues at Sun Micro Systems. It is a *");

System.out.println("\t\t\t\t * multithreaded language and can access data from *");

System.out.println("\t\t\t\t * a local system as well as net. Java program can *");

System.out.println("\t\t\t\t * create Applets and Applications as general programs *");

System.out.println("\t\t\t\t * like any other programming languages. Java does not *");

System.out.println("\t\t\t\t * require any preprocessor or inclusion of header *");

System.out.println("\t\t\t\t * files for creating a java application program. It *");

System.out.println("\t\t\t\t * is a case sensitive language. Java programming is *");

System.out.println("\t\t\t\t * written within a class. The variables and functions *");


System.out.println("\t\t\t\t * are declared and defined with the class. Platform *");

System.out.println("\t\t\t\t * Independence is the most import characteristic of *");

System.out.println("\t\t\t\t * Java that distinguishes it from most other *");

System.out.println("\t\t\t\t * programming languages. *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t ************************************************************");

System.out.println("\n\n\n\n\n\n\n");

System.out.print("\t\t\t\t Enter your choice(1-Main Menu,Any other number-Quit) :");

int con=0;

con=Integer.parseInt(br.readLine());

return(con);

int men_introduction()throws IOException

//About Mensuration

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");

System.out.println("\t\t\t\t ************************************************************");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * About Mensuration *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * The calculation of geometric quantities *");

System.out.println("\t\t\t\t * such as length, area, and volume from *");

System.out.println("\t\t\t\t * dimensions and angles that are already *");

System.out.println("\t\t\t\t * known is known as mensuration. *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * Mensuration forms an integral part of *");

System.out.println("\t\t\t\t * mathematics. *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * Mensuration is extremely essential in *");

System.out.println("\t\t\t\t * our day to day life activities. *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * This program is a simple means to do *");

System.out.println("\t\t\t\t * mensuration. *");


System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t ************************************************************");

System.out.println("\n\n\n\n\n\n\n");

System.out.print("\t\t\t\t Enter your choice(1-Main Menu,Any other number-Quit) :");

int con=0;

con=Integer.parseInt(br.readLine());

return(con);

int circle()throws IOException

//circle

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t Mensuration on circle \n\n\n");

System.out.println("\n\n\n\t\t\t\t\t\t *********************");

System.out.print("\n\n\n\n\n\n\n\n\t\t\t\t Enter 1 to find circumference or 2 to find area : ");

double area=0,circumference=0,pi=3.14,r=0;

int choice=0;

choice=Integer.parseInt(br.readLine());

if(choice==1)

System.out.print("\n\n\n\t\t\t\t Enter the radius:");

r=Double.parseDouble(br.readLine());

circumference=2*pi*r;

System.out.print("\n\n\n\t\t\t\t Circumference of the circle = "+circumference+" units\n\n\n");

else if(choice==2)

System.out.print("\n\n\n\t\t\t\t Enter the radius:");

r=Double.parseDouble(br.readLine());

area=pi*r*r;

System.out.print("\n\n\n\t\t\t\t Area of the circle = "+area+" sq. units \n\n\n");

}
else

System.out.print("\n\t\t\t\t It is a wrong choice.\n\n\n");

System.out.print("\n\t\t\t\t Enter your choice(1-Main Menu,Any other number-Quit) : ");

int con=0;

con=Integer.parseInt(br.readLine());

return(con);

int cube()throws IOException

//cube

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t Mensuration on cube \n\n\n");

System.out.println("\n\n\n\t\t\t\t\t\t *********************");

System.out.print("\n\n\n\n\n\n\n\n\n\t\t\t\t Enter 1 to find total surface area or 2 to find volume: ");

double volume=0,tsa=0,edge=0;

int choice=0;

choice=Integer.parseInt(br.readLine());

if(choice==1)

System.out.print("\n\n\n\t\t\t\t Enter the length of the edge: ");

edge=Double.parseDouble(br.readLine());

tsa=6*edge*edge;

System.out.print("\n\n\n\t\t\t\t Total surface area = "+tsa+" sq. units \n\n\n");

else if(choice==2)

System.out.print("\n\n\n\t\t\t\t Enter the length of the edge: ");

edge=Double.parseDouble(br.readLine());

volume=edge*edge*edge;

System.out.print("\n\n\n\t\t\t\t Volume = "+volume+" cubic units\n\n\n");

else
{

System.out.println("\n\n\n\t\t\t\t It is a wrong choice.\n\n\n");

System.out.print("\n\t\t\t\t Enter your choice(1-Main Menu,Any other number-Quit) : ");

int con=0;

con=Integer.parseInt(br.readLine());

return(con);

int cuboid()throws IOException

//cuboid

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t Mensuration on cuboid \n\n\n");

System.out.println("\n\n\n\t\t\t\t\t\t *********************");

System.out.print("\n\n\n\n\n\n\n\n\n\t\t\t\t Enter 1 to find total surface area or 2 to find volume: ");

double volume=0,tsa=0,l=0,b=0,h=0;

int choice=0;

choice=Integer.parseInt(br.readLine());

if(choice==1)

System.out.print("\n\n\n\t\t\t\t Enter the length : ");

l=Double.parseDouble(br.readLine());

System.out.print("\n\n\n\t\t\t\t Enter the breadth : ");

b=Double.parseDouble(br.readLine());

System.out.print("\n\n\n\t\t\t\t Enter the height : ");

h=Double.parseDouble(br.readLine());

tsa=2*(l*b+b*h+l*h);

System.out.print("\n\n\n\t\t\t\t Total surface area = "+tsa+" sq. units\n\n\n");

else if(choice==2)

System.out.print("\n\n\n\t\t\t\t Enter the length : ");

l=Double.parseDouble(br.readLine());

System.out.print("\n\n\n\t\t\t\t Enter the breadth : ");


b=Double.parseDouble(br.readLine());

System.out.print("\n\n\n\t\t\t\t Enter the height : ");

h=Double.parseDouble(br.readLine());

volume=l*b*h;

System.out.print("\n\n\n\t\t\t\t Volume = "+volume+" cubic units\n\n\n");

else

System.out.println("\n\n\n\t\t\t\t It is a wrong choice.");

System.out.print("\n\t\t\t\t Enter your choice(1-Main Menu,Any other number-Quit) : ");

int con=0;

con=Integer.parseInt(br.readLine());

return(con);

int rectangle()throws IOException

//rectangle

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t Mensuration on rectangle \n\n\n");

System.out.println("\n\n\n\t\t\t\t\t\t *********************");

System.out.print("\n\n\n\n\n\n\n\n\n\t\t\t\t Enter 1 to find area or 2 to find perimeter: ");

double area=0,perimeter=0,l=0,b=0;

int choice=0;

choice=Integer.parseInt(br.readLine());

if(choice==1)

System.out.print("\n\n\n\t\t\t\t Enter the length : ");

l=Double.parseDouble(br.readLine());

System.out.print("\n\n\n\t\t\t\t Enter the breadth : ");

b=Double.parseDouble(br.readLine());

area=l*b;

System.out.print("\n\n\n\t\t\t\t Area = "+area+" sq. units\n\n\n");

}
else if(choice==2)

System.out.print("\n\n\n\t\t\t\t Enter the length : ");

l=Double.parseDouble(br.readLine());

System.out.print("\n\n\n\t\t\t\t Enter the breadth : ");

b=Double.parseDouble(br.readLine());

perimeter=2*(l+b);

System.out.print("\n\n\n\t\t\t\t Perimeter = "+perimeter+" units\n\n\n");

else

System.out.println("\n\n\n\t\t\t\t It is a wrong choice.");

System.out.print("\n\t\t\t\t Enter your choice(1-Main Menu,Any other number-Quit) : ");

int con=0;

con=Integer.parseInt(br.readLine());

return(con);

int square()throws IOException

//square

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t Mensuration on square \n\n\n");

System.out.println("\n\n\n\t\t\t\t\t\t *********************");

System.out.print("\n\n\n\n\n\n\n\n\n\t\t\t\t Enter 1 to find area or 2 to find perimeter: ");

double area=0,perimeter=0,s=0;

int choice=0;

choice=Integer.parseInt(br.readLine());

if(choice==1)

System.out.print("\n\n\n\t\t\t\t Enter the side : ");

s=Double.parseDouble(br.readLine());

area=s*s;

System.out.print("\n\n\n\t\t\t\t Area = "+area+" sq. units\n\n\n");


}

else if(choice==2)

System.out.print("\n\n\n\t\t\t\t Enter the side : ");

s=Double.parseDouble(br.readLine());

perimeter=4*s;

System.out.print("\n\n\n\t\t\t\t Perimeter = "+perimeter+" units\n\n\n");

else

System.out.print("\n\n\n\t\t\t\t It is a wrong choice.");

System.out.print("\n\t\t\t\t Enter your choice(1-Main Menu,Any other number-Quit) : ");

int con=0;

con=Integer.parseInt(br.readLine());

return(con);

int cone()throws IOException

//cone

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t Mensuration on cone \n\n\n");

System.out.println("\n\n\n\t\t\t\t\t\t *********************");

System.out.print("\n\n\n\n\n\n\n\n\n\t\t\t\t Enter 1 to find total surface area or 2 to find volume: ");

double volume=0,tsa=0,h=0,l=0,r=0,pi=3.14;

int choice=0;

choice=Integer.parseInt(br.readLine());

if(choice==1)

System.out.print("\n\n\n\t\t\t\t Enter the radius: ");

r=Double.parseDouble(br.readLine());

System.out.print("\n\n\n\t\t\t\t Enter the slant height: ");

l=Double.parseDouble(br.readLine());

tsa=(pi*r*l)+(pi*r*r);
System.out.print("\n\n\n\t\t\t\t Total surface area = "+tsa+" sq. units\n\n\n");

else if(choice==2)

System.out.print("\n\n\n\t\t\t\t Enter the radius: ");

r=Double.parseDouble(br.readLine());

System.out.print("\n\n\n\t\t\t\t Enter the height: ");

h=Double.parseDouble(br.readLine());

volume=(pi*r*r*h)/3;

System.out.print("\n\n\n\t\t\t\t Volume = "+volume+" cubic units\n\n\n");

else

System.out.println("\n\n\n\t\t\t\t It is a wrong choice.");

System.out.print("\n\t\t\t\t Enter your choice(1-Main Menu,Any other number-Quit) : ");

int con=0;

con=Integer.parseInt(br.readLine());

return(con);

int sphere()throws IOException

//sphere

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t Mensuration on sphere \n\n\n");

System.out.println("\n\n\n\t\t\t\t\t\t *********************");

System.out.print("\n\n\n\n\n\n\n\n\n\t\t\t\t Enter 1 to find total surface area or 2 to find volume: ");

double volume=0,tsa=0,r=0,pi=3.14;

int choice=0;

choice=Integer.parseInt(br.readLine());

if(choice==1)

System.out.print("\n\n\n\t\t\t\t Enter the radius: ");

r=Double.parseDouble(br.readLine());
tsa=4*pi*r*r;

System.out.print("\n\n\n\t\t\t\t Surface area = "+tsa+" sq. units\n\n\n");

else if(choice==2)

System.out.print("\n\n\n\t\t\t\t Enter the radius: ");

r=Double.parseDouble(br.readLine());

volume=(4*pi*r*r*r)/3;

System.out.print("\n\n\n\t\t\t\t Volume = "+volume+" cubic units\n\n\n");

else

System.out.println("\n\n\n\t\t\t\t It is a wrong choice.");

System.out.print("\n\t\t\t\t Enter your choice(1-Main Menu,Any other number-Quit) : ");

int con=0;

con=Integer.parseInt(br.readLine());

return(con);

int cylinder()throws IOException

//cylinder

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t Mensuration on cylinder \n\n\n");

System.out.println("\n\n\n\t\t\t\t\t\t *********************");

System.out.print("\n\n\n\n\n\n\n\n\n\t\t\t\t Enter 1 to find total surface area or 2 to find volume: ");

double volume=0,tsa=0,h=0,r=0,pi=3.14;

int choice=0;

choice=Integer.parseInt(br.readLine());

if(choice==1)

System.out.print("\n\n\n\t\t\t\t Enter the radius: ");

r=Double.parseDouble(br.readLine());

System.out.print("\n\n\n\t\t\t\t Enter the height: ");


h=Double.parseDouble(br.readLine());

tsa=2*pi*r*h;

System.out.print("\n\n\n\t\t\t\t Total surface area = "+tsa+" sq. units\n\n\n");

else if(choice==2)

System.out.print("\n\n\n\t\t\t\t Enter the radius: ");

r=Double.parseDouble(br.readLine());

System.out.print("\n\n\n\t\t\t\t Enter the height: ");

h=Double.parseDouble(br.readLine());

volume=pi*r*r*h;

System.out.print("\n\n\n\t\t\t\t Volume = "+volume+" cubic units\n\n\n");

else

System.out.println("\n\n\n\t\t\t\t It is a wrong choice.");

System.out.print("\n\t\t\t\t Enter your choice(1-Main Menu,Any other number-Quit) : ");

int con=0;

con=Integer.parseInt(br.readLine());

return(con);

int conclusion()throws IOException

//conclusion

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");

System.out.println("\t\t\t\t ************************************************************");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * Conclusion *");

System.out.println("\t\t\t\t * When I was given the work of this project I was very *");

System.out.println("\t\t\t\t * fearful. But as time passed by it became easier for me *");

System.out.println("\t\t\t\t * to do this project. I enjoyed a lot to do this project. *");

System.out.println("\t\t\t\t * It helped to improve myself in mathematics as I feared *");


System.out.println("\t\t\t\t * mensuration the most. After completing the project *");

System.out.println("\t\t\t\t * I also got a wider concept on java. *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * After completing the project I realised the benefits *");

System.out.println("\t\t\t\t * of java programming. By doing this type of projects *");

System.out.println("\t\t\t\t * one can do his/her day to day work quite easily and *");

System.out.println("\t\t\t\t * within a few seconds. *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * Lastly I must thank each and everyone who are *");

System.out.println("\t\t\t\t * associated in this project to make it a fruitful *");

System.out.println("\t\t\t\t * one. *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t ************************************************************");

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n");

System.out.print("\n\t\t\t\t Enter your choice(1-Main Menu,Any other number-Quit) : ");

int con=0;

con=Integer.parseInt(br.readLine());

return(con);

int reference()throws IOException

//reference

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");

System.out.println("\t\t\t\t ************************************************************");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * Reference *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * To complete the project I took help of *");

System.out.println("\t\t\t\t * the following books : *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * 1.Understanding Computer Application *");

System.out.println("\t\t\t\t * Author- Vijay Kumar Pandey & *");

System.out.println("\t\t\t\t * Dilip Kumar Dey *");


System.out.println("\t\t\t\t * Arya Publishing Company *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * 2.Computer Applications *");

System.out.println("\t\t\t\t * Author- DheerajMehrotra *");

System.out.println("\t\t\t\t * S.Chand& Company Ltd. *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * 3.Foundation Mathematics *");

System.out.println("\t\t\t\t * Author-R.S.Aggarwal *");

System.out.println("\t\t\t\t * Goyal Brothers Prakashan *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t * *");

System.out.println("\t\t\t\t ************************************************************");

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n");

System.out.print("\n\t\t\t\t Enter your choice(1-Main Menu,Any other number-Quit) : ");

int con=0;

con=Integer.parseInt(br.readLine());

return(con);

public static void main(String args[])throws IOException

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

mensuration in = new mensuration();

int head,con=0,i=1,contents=0;

head=in.head();

if(head==1)

do

contents=in.contents();

switch(contents)

case 1:

con=in.acknowledgement();

break;
case 2:

con=in.introduction();

break;

case 3:

con=in.men_introduction();

break;

case 4:

con=in.circle();

break;

case 5:

con=in.cube();

break;

case 6:

con=in.cuboid();

break;

case 7:

con=in.rectangle();

break;

case 8:

con=in.square();

break;

case 9:

con=in.cone();

break;

case 10:

con=in.sphere();

break;

case 11:

con=in.cylinder();

break;

case 12:

con=in.conclusion();

break;

case 13:
con=in.reference();

break;

default:

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");

System.out.println("\t\t\t\t\t\t*************** Thank You ***************");

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");

i++;

if(con==1)

continue;

else

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");

System.out.println("\t\t\t\t\t\t*************** Thank You ***************");

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");

i++;

while(i==1);

else

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");

System.out.println("\t\t\t\t\t\t*************** Thank You ***************");

System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");

}
SAMPLE OUTPUT:
SAMPLE OUTPUT 1: First Interface

SAMPLE OUTPUT 2: Acknowledgement


SAMPLE OUTPUT 3: Introduction to Java

SAMPLE OUTPUT 4: About Mensuration


SAMPLE OUTPUT 5: Mensuration of Circle

SAMPLE OUTPUT 6: Mensuration of Cube


SAMPLE OUTPUT 7: Mensuration of Cuboid
SAMPLE OUTPUT 8: Mensuration of Rectangle
SAMPLE OUTPUT 9: Mensuration of Square
SAMPLE OUTPUT 10: Mensuration of Cone
SAMPLE OUTPUT 11: Mensuration of Sphere
SAMPLE OUTPUT 11: Mensuration of Cylinder
Conclusion
When I was given the work of this project, I was very fearful. But as
time passed by it became easier for me to do this project. I enjoyed a
lot to do this project. It helped to improve myself in arithmetic’s as I
feared mensuration the most. After completing the project, I also got
a wider concept on java.

After completing the project, I realised the benefits of java


programming. By doing this type of projects one can do his/her day-
to-day work quite easily and within a few seconds.

Lastly, I must thank each and everyone who are associated in this
project to make it a fruitful one.
Reference
To complete the project, I took help of the following books:

1.Understanding Computer Application

Author- Vijay Kumar Pandey & Dilip Kumar Dey

Arya Publishing Company

2.Computer Applications

Author- DheerajMehrotra

S.Chand& Company Ltd.

3.Foundation Mathematics

Author-R.S.Aggarwal

Goyal Brothers Prakashan

You might also like