JAVA-Record-03)AIM: Create a class Rectangle. The class has attributes length and width. It should have methods that calculate the perimeter and area of the rectangle. It should have read Attributes method to read length and width from user.

 03)AIM:

Create a class Rectangle. The class has attributes length and width. It should have methods that calculate the perimeter and area of the rectangle. It should have read Attributes method to read length and width from user.

Algorithm  

Step 1: Start,

Step 2: Read Length(L) and Breadth(B),

Step 3: Calculate area = L * B ,

Step 4: Print " area ",

Step 5: Calculate Perimeter = 2 * ( L + B ) ,

Step 6: Print " Perimeter ",

Step 7: Stop.

Flow Chart:

 

Code:03

Output:01

Output:02







 

 

 

 

 

 

 

 

 

 

 

Comments

Popular posts from this blog

digital marketing ppt-u1

SOFTWARE

cn lab

Computer Operations and Performing - D L Unit-1-1

DS-Record-mca-04) write a program for evaluating a given postfix expression using stack.

DBMS Degree Lab Records

Unit 2: Foundations of Ownership, Security Related Concepts in Blockchain

Unit-1 Foundations of Software Systems and Blockchain

Access the Internet to Browse Infromation & E-Mail Operation- D L Unit-2-1

6)what are the various service of internet and protocols ICT-unit-1