Skip to content

TruptiLone/Java-OOPS

Repository files navigation

Java Arithmetic Operations and GCD Calculator

StudentGradeJavaFX

Overview

This Java program performs basic arithmetic operations (addition, subtraction, multiplication, division, and modulus) and computes the Greatest Common Divisor (GCD) of two integers passed as command-line arguments.

Features:

  • Takes two integers as command-line arguments.
  • Performs the following operations:
    • Addition
    • Subtraction
    • Multiplication
    • Division
    • Modulus
    • Greatest Common Divisor (GCD)
  • Validates the input to ensure exactly two integers are provided.
  • Handles division by zero and other errors gracefully.

Requirements:

  • Java (version 8 or higher) must be installed.
  • IntelliJ IDEA or any Java IDE for development.

Usage

  1. Clone this repository.

  2. Compile the program using your IDE or from the command line.

  3. Run the program from the terminal with two integers as arguments:

    java LastnameFirstnameA1 <number1> <number2>
    

Concepts Covered:

  • Command-line arguments in Java
  • Input validation
  • Basic arithmetic operations
  • Error handling for division by zero

BankAccountFuctionality

BasicArithematicOperations

InheritanceAndPolymorphism

Multithreaded Factor Finder

StringsAndArrays

About

Java Object oriented Programming Concepts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages