The Programming Project

Monday, December 15, 2025

Income Tax Calculator 2025 Onwards New Regime

Budget 2025 Income Tax Calculator

Calculate your tax liability under the new tax regime with detailed breakdown

Your total salary before any deductions
Interest, dividends, rental income, etc.

Try with example incomes:

Key Features of Budget 2025

💰

No Tax up to 12 Lakh

Rebate of 60,000 makes income up to 12,00,000 tax-free

📊

New Tax Slabs

Revised tax slabs under new regime for FY 2025-2026

🛡️

Marginal Relief

Protection for those earning just above 12 lakh

💼

Standard Deduction

Increased to 75,000 for salaried individuals

New Tax Slabs (FY 2025-2026)

Income Slab
Tax Rate
Up to 4,00,000
0%
4,00,001 - 8,00,000
5%
8,00,001 - 12,00,000
10%
12,00,001 - 16,00,000
15%
16,00,001 - 20,00,000
20%
20,00,001 - 24,00,000
25%
Above 24,00,000
30%

Note: This calculator provides an indicative estimate based on Budget 2025 proposals. For actual tax filing, please consult a qualified tax advisor. Results may vary based on individual circumstances.

ISC Computer Science Theory Paper 2023 Program Transpose of a Matrix

 





import java.util.*;

public class Matrix {

    public static void main(String[] args) {

        // Create a single Scanner object for System.in
        Scanner scanner = new Scanner(System.in);

        // Pass the single Scanner object to the Trans constructor
        Trans obj = new Trans(scanner);

        obj.fillarray();
        obj.display();

        // Close the Scanner
        scanner.close();
    }
}

class Trans {

    private int m;
    private int[][] arr;
    private int[][] arrT;
    private Scanner in;

    Trans(Scanner scanner) {
        this.in = scanner;
        System.out.println("Enter the order (size) of the square matrix:");
        this.m = in.nextInt();
        this.arr = new int[m][m];
        this.arrT = new int[m][m];
    }

    public void fillarray() {
        System.out.println("\n--- Entering elements for the " + m + "x" + m + " matrix ---");
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < m; j++) {
               
                System.out.println("Input element at [" + i + "][" + j + "]:");
                arr[i][j] = in.nextInt();
            }
        }
    }

    public void display() {
        System.out.println("\nORIGINAL MATRIX:");
        printMatrix(arr);

        transpose();
    }

    private void transpose() {
        System.out.println("\nTRANSPOSE OF THE MATRIX:");
        // The core logic for transpose: ArrT[i][j] = Arr[j][i]
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < m; j++) {
                arrT[i][j] = arr[j][i];
            }
        }
        printMatrix(arrT);
    }

    // Helper method for cleaner printing and better formatting
    private void printMatrix(int[][] matrix) {
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < m; j++) {
                // Use format for aligned columns, which improves readability
                System.out.format("%5d", matrix[i][j]);
            }
            System.out.println();
        }
    }
}

Sunday, December 14, 2025

ISC Computer Science Theory Paper 2023 Program Dudeney Number

 




import java.util.Scanner;

public class Dudeney {

    public static void main(String[] args) {

        NumDude obj = new NumDude();
        obj.input();
        obj.isDude();

    }

}

class NumDude {

    public void isDude() {
        if (numb == (int) Math.pow(sumDigits(numb), 3)) {
            System.out.println(numb + " is a Dudeney Number");
        }else {
            System.out.println(numb + " is not a Dudeney Number");
        }
    }

    private int sumDigits(int x) {
        if (x > 10) {
            return ((x % 10) + sumDigits(x / 10));
        } else {
            return x;
        }

    }

    public void input() {
        Scanner scanner = new Scanner(System.in);
        System.out.print("Enter a positive integer: ");
        numb = scanner.nextInt();
        scanner.close();
    }

    public NumDude() {
        this.numb = 0;
    }
    private int numb;

}

🔢 Dudeney Number Checker

A Dudeney number is a positive integer that is a perfect cube such that the sum of its decimal digits equals the cube root of the number.

🎯 Examples:

  • 1 = 1³ and 1 = 1
  • 512 = 8³ and 5+1+2 = 8
  • 4913 = 17³ and 4+9+1+3 = 17
  • 5832 = 18³ and 5+8+3+2 = 18

Try numbers like: 1, 512, 4913, 5832, 17576, 19683

Tuesday, September 19, 2023

ICSE Java Programming Function Overload 2016 Q6 Solved

 Special words are those words which starts and ends with the same letter. 

Examples:
EXISTENCE
COMIC
WINDOW
Palindrome words are those words which read the same from left to right and vice versa
Examples:
MALAYALAM
MADAM
LEVEL
ROTATOR
CIVIC
All palindromes are special words, but all special words are not palindromes. Write a program to accept a word check and print Whether the word is a palindrome or only special word.

import java.util.Scanner;

public class PalindromeOrSpecialWord {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("Enter a word: ");
        String word = scanner.nextLine();
        scanner.close();

        if (isPalindrome(word) && isSpecial(word)) {
            System.out.println("The word is both a palindrome and a special word.");
        } else if (isPalindrome(word)) {
            System.out.println("The word is a palindrome.");
        } else if (isSpecial(word)) {
            System.out.println("The word is a special word.");
        } else {
            System.out.println("The word is neither a palindrome nor a special word.");
        }
    }

    // Method to check if a word is a palindrome
    public static boolean isPalindrome(String word) {
        String reversed = "";
        for (int i = word.length() - 1; i >= 0; i--) {
            reversed += word.charAt(i);
        }
        return word.equalsIgnoreCase(reversed);
    }

    // Method to check if a word is a special word
    public static boolean isSpecial(String word) {
        return word.length() >= 2 && word.charAt(0) == word.charAt(word.length() - 1);
    }
}

ICSE Java Programming Function Overload 2016 Q5 Solved

Using the switch statement, write a menu driven program in Java for the following: (i) To print the Floyd’s triangle [Given below] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (ii) To display the following pattern: I I C I C S I C S E  

For an incorrect option, an appropriate error message should be displayed. 



import java.util.Scanner;

public class PatternCreation {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int choice;

        do {
            System.out.println("Menu:");
            System.out.println("1. Print Floyd's Triangle");
            System.out.println("2. Display Pattern");
            System.out.println("3. Exit");
            System.out.print("Enter your choice (1/2/3): ");
            choice = scanner.nextInt();

            switch (choice) {
                case 1:
                    printFloydsTriangle();
                    break;
                case 2:
                    displayPattern();
                    break;
                case 3:
                    System.out.println("Exiting the program.");
                    break;
                default:
                    System.out.println("Invalid choice. Please select 1, 2, or 3.");
                    break;
            }
        } while (choice != 3);

        scanner.close();
    }

    // Method to print Floyd's Triangle
    public static void printFloydsTriangle() {
        int n = 1;
        int rows = 5; // You can change the number of rows as needed

        for (int i = 1; i <= rows; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print(n + " ");
                n++;
            }
            System.out.println();
        }
    }

    // Method to display the specified pattern
    public static void displayPattern() {
        String pattern = "ICSE";
        for (int i = 0; i < pattern.length(); i++) {
            for (int j = 0; j <= i; j++) {
                System.out.print(pattern.charAt(j) + " ");
            }
            System.out.println();
        }
    }
}

ICSE Java Programming Function Overload 2016 Q4 Solved

Define a class named BookFair with the following description: [15] Instance variables/Data members :

String Bname — stores the name of the book double price — stores the price of the book

Member methods : (i) BookFair() — Default constructor to initialize data members

(ii) void Input() — To input and store the name and the price of the book.

(iii) void calculate() — To calculate the price after discount. Discount is calculated based on the following criteria.

(iv) void display() — To display the name and price of the book after discount. Write a main method to create an object of the class and call the above member methods. Price Discount Less than or equal to Rs. 1000 2% of price More than Rs. 1000 and less than or equal to Rs. 3000 10% of price More than % 3000 15% of price


import java.util.Scanner;

class BookFair {

    private String Bname; // stores the name of the book

    private double price; // stores the price of the book

    // Default constructor to initialize data members

    public BookFair() {

        Bname = "";

        price = 0.0;

    }

    // To input and store the name and the price of the book

    public void Input() {

        Scanner scanner = new Scanner(System.in);

        System.out.print("Enter the name of the book: ");

        Bname = scanner.nextLine();

        System.out.print("Enter the price of the book: Rs. ");

        price = scanner.nextDouble();

        scanner.close();

    }

    // To calculate the price after discount based on the given criteria

    public void calculate() {

        if (price <= 1000) {

            price -= (0.02 * price); // 2% discount

        } else if (price > 1000 && price <= 3000) {

            price -= (0.10 * price); // 10% discount

        } else {

            price -= (0.15 * price); // 15% discount

        }

    }

    // To display the name and price of the book after discount

    public void display() {

        System.out.println("Book Name: " + Bname);

        System.out.println("Price after discount: Rs. " + price);

    }

    public static void main(String[] args) {

        BookFair book = new BookFair(); // Create an object of the class

        book.Input(); // Input the name and price of the book

        book.calculate(); // Calculate the price after discount

        book.display(); // Display the book details after discount

    }

}

Sunday, April 30, 2023

ICSE Java Programming Function Overload 2017 Q8 Solved

ICSE Java Programming Design a class to overload a function 2017 Q8 Solved 



import java.util.Scanner;

public class ICSEJava {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s;
        char c;
        System.out.println("Enter the string");
        s = in.nextLine();
        System.out.println("Enter the character");
        c = in.nextLine().charAt(0);
        StringCheck obj = new StringCheck();
        obj.check(s, c);
        obj.check(s);
        in.close();
    }
}

class StringCheck {
    public void check(String str, char ch) {
        for (int i = 0; i < str.length(); i++) {
            if (ch == str.charAt(i))
                counter++;
        }
        System.out.println("Number of times " + ch + " present is " + counter);
    }

    public void check(String str) {
        str = str.toLowerCase();
        for (int i = 0; i < str.length(); i++) {
            if (str.charAt(i) == 'a' || str.charAt(i) == 'e' || str.charAt(i) == 'i' || str.charAt(i) == 'o'
                    || str.charAt(i) == 'u')
                System.out.print(str.charAt(i) + " ");
        }
    }

    StringCheck() {
        counter = 0;
    }

    private int counter;
}