Acquire a Knowledge of Java Programming Language

Hello Guys🤙


 In Our Previous Block,   We  Have  Seen  the   Basics   of   Java   Programming  and   Some  Simple   Programs.

In today's Blog We will Create a Basic Project  in Java Programming Language. 

With the Help of Java Program Using the Length and Breadth of the House. We Can Easily Find Out the Area of ​​The House and How Many Tiles Are to Be Installed in That House and the Cost of Installation and Cost of Wiring in the House. 


Basic Project in Java Programming Language. 

Program - Basic Project 


import java.io.*;

import java.util.Scanner;

class Project {

public static void main(String args[ ]) 

{

Scanner obj = new Scanner(System.in);

int l,b,a,tl,tb,ta,x,p;

p=1;

int la,o,wire,pr,g,lb,h,me;

char ch;

System.out.print("Enter Your House Length= ");

l = obj.nextInt( );

System.out.print("Enter Your House Bregth= ");

b = obj.nextInt( );

 a = l * b;

System.out.println("Area of House="+a+"sq.");

System.out.println("Select       Tiles        Price(per/sq)");

System.out.println("A    -   Black-Marbel    150/sq");

System.out.println("B    -   Kota Stone        100/sq");

System.out.println("C    -   Granite              200/sq");

System.out.println("D    -   White-Marbel   250/sq");

System.out.print("Select Any Tiles in Form of A,B,C Or D = ");

  ch = obj.next( ).charAt(0);

System.out.print("Enter Length of Tiles= ");

  tl = obj.nextInt( );

System.out.print("Enter Breagth of Tiles= ");

  tb = obj.nextInt( );

ta = tl * tb;

System.out.println("Area of Tiles= "+ta+"sq");

x = (a/ta);

System.out.println("Tiles Using In House= "+x);

  

 if (ch=='a'||ch=='A') 

   {

    p = x*ta*150;

    System.out.println("Price of Tiles Using In House="+p);

    }

else if (ch=='b' || ch=='B') 

{

    p = x*ta*100;

    System.out.println("Price of Tiles Using In House="+p);

}

else if (ch=='c' || ch=='C') 

{

    p = x*ta*200;

    System.out.println("Price of Tiles Using In House="+p);

}

else if (ch=='D' || ch=='d') 

{

    p = x*ta*250;

  System.out.println("Price of Tiles Using In House="+p);

}

else 

{

    System.out.println("Select Correct Character");

}

System.out.print("Enter Tiles Labour price Per Square Feet= ");

la = obj.nextInt( );

o = la * a;

System.out.println("Labour Charge= "+o);

o = o+p;

System.out.println("Installation of Tiles Total Expense  = "+o);


System.out.print("How many square feet of wire Do you want to install in your house? =" );

wire = obj.nextInt( );

System.out.print("Price of wire Per square Feet = ");

pr = obj.nextInt( );

g = wire*pr;

System.out.println("Wire Charge or price = "+g);

System.out.print("Labour Charge to Install Wire in House Per/sq. Price= ");

lb = obj.nextInt( );

h = wire*lb;

System.out.println("Labour Charge = "+h);

h = h+g;

System.out.println("Total Expense to Install wire in House = "+h);

me = h+o;

System.out.println("Total Expense in House= "+me);

  }

 }


Output 


Enter Your House Length = 50

Enter Your House Breath = 20

Area of House= 1000 sq. =

Select      Tiles       Price(per/sq)

A    -   Black-Marbel    150/sq

B    -   Kota Stone        100/sq

C    -   Granite              200/sq

D    -   White-Marbel    250/sq

Select Any Tiles in Form of A,B,C Or D = b

Enter Length of Tiles = 3

Enter Length of Tiles = 4

Area of Tiles = 12 sq

Tiles Using In House = 83

Price of Tiles Using In House= 99600

Enter Tiles Labour price Per Square Feet = 8

Labour Charge = 8000

Installation of Tiles Total Expense  =  107600

How many square feet of wire do you want to install in your house? = 1500

Price of wire Per square Feet = 5

Wire Charge or price =  7500

Labour Charge to Install wire in House Per/sq. Price = 7

Labour Charge = 10500

Total Expense to Install wire in House = 18000

Total Expense in House = 125600


If You Want to Know more Java Programming Language - then Click this Link ðŸ‘‡

If You Want to Know About CSS Language and It Web Design, then Click This Link 👇

Can You Want to See the Privacy Policy of this Page then Click on this Link ðŸ‘‡


Hope You Have Got Help in Learning Java Language and His Programs from this Blog. ðŸ¤™
Give Your Feedback on Comment Box 📦 ðŸ‘‡

Comments