**TILE CHECHKER**

TILE CALCULATOR IN JAVA 

A Practical Program for Everyday Use

When it comes to interior design, construction planning, or even basic renovation work, one common question always pops up: How many tiles do I need to cover this room? That’s exactly what this program answers—and in the most efficient, beginner-friendly way possible.

This Java-based Tile Calculator accepts input from the user to determine the dimensions of both the tiles and the room. It then calculates the total area of the room and divides it by the area of a single tile to determine the exact number of tiles required. To ensure you don’t come up short, it uses Java’s Math.ceil() method to round up the number of tiles—because you can’t buy half a tile in real life!

But that’s not all.

The program also includes an optional feature that lets the user calculate how many boxes of tiles they’ll need based on how many tiles come in each box—a common real-world consideration. With a simple “Yes or No” prompt, the program becomes dynamic and flexible to different user needs.

Whether you're learning Java, managing a flooring project, or just curious about how programming can solve real-life problems, this project demonstrates the power of logic, user input, and precision math in action.

What follows in this blog post:

  • A flowchart that maps the logic visually.

  • A pseudocode outline for non-programmers.

  • And the full Java code implementation, annotated and explained.

This isn’t just a program—it’s a perfect example of how programming meets practical problem-solving.


FLOWCHART
This is flow step-by-step of my program

Pseudocode
This is a step-by-step pseudocode of how this program works.

START
Enter The Length Of Tile (LT) and The Breath Of Tile (BT).
Enter The Length Of Room (LR) and The Breath Of Room (BT).
Calculate The Area Of The Tile (AT) = ( LT * BT ).
Calculate The Area Of The Room (AR) = ( LR * BR ).
Divide The Area Of The Room By The Area Of The Tile = (AR / AT)
Print Out The Result
END.

IMPLEMENTATION
import java.util.*;
public class TileCalculatore {
    public static void main(String[] args){
        //Accepting input of the tile length and breath
        System.out.println("Welcome To The Best Tile Checker");
        //breath
        Scanner sc = new Scanner(System.in);
        System.out.println("Tiles Length(meter): ");
        double TL = sc.nextDouble();
        //length
        System.out.println("Tiles Breath(meter): ");
        double TB = sc.nextDouble();
        double AT = (TL*TB);
        //Accepting input of the room length and breath
        //breath
        System.out.println("Room Length(meter): ");
        double RL = sc.nextDouble();
        //length
        System.out.println("Room Breath(meter): ");
        double RB = sc.nextDouble();
        double AR = (RL*RB);
        //calciulating the the number of tile needed
        int  AT_AR = (int) Math.ceil (AR/AT);      
        System.out.println("THIS IS THE EXACT AMOUNT OF TILES NEEDED FOR THIS ROOM: "+ AT_AR);
        //This Calculates the box of tile needed for the room

       
        //Output the resut for the box ofntile needed
        System.out.println("IF YOU WANT TO KNOW THE AMOUNT OF TILE CARTOONS NEEDED");
        System.out.println("1. YES \n 2. NO");
        int yesno = sc.nextInt();
        if(yesno == 1){
         System.out.println("Enter The Number Of Tile per Box: ");
        double Numperbox = sc.nextDouble();
        int box = (int) Math.ceil(AT_AR/Numperbox);
        System.out.println("THE TOTAL AMOUNT OF BOX OF TILES NEEEDED: " + box);
        }
        else{
            System.out.println("THANK YOU FOR TRYING TILE CHECKER");
        }

        sc.close();

    }
}

/* NAME: UMARU JUSTIN ROGERS
ID: I-24-62999
INFORMATION TECHNOLOGY */





Comments

Popular posts from this blog

**" MILESTONE OF COMPUTING & PROGRAMMING LANGUAGE" **"SOFTWARE DEVELOPMENT PARADIGMS"

***Grading System for IPAM, University of Sierra Leone***