Skip to content

Jayaditya177/PIJ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Part 1

Fibonacci Number Generator

This Java program calculates and prints the first n Fibonacci numbers, where n is provided by the user.

Usage

  1. Compile the code:
    javac FibonacciScanner.java
    

Part 2

Calculator Application

This is a simple calculator application that allows users to perform basic arithmetic operations and statistical calculations.

Files

Main.java

The main class responsible for running the calculator application. It takes user input for choosing an operation and performs the calculation accordingly. It utilizes the UserInput class for handling user input and the Calculator class for performing calculations.

UserInput.java

A utility class for handling user input. It provides methods to get double input, string input, and array input from the user. The closeScanner method is used to close the underlying Scanner object.

Calculator.java

Contains a set of static methods for performing various calculations. It includes methods for basic arithmetic operations (addition, subtraction, multiplication, division, power) and statistical operations (mean, standard deviation, variance). The methods are designed to be reusable and can be called from other classes.

How to Use

Compile the Java files using a Java compiler.

javac Main.java UserInput.java Calculator.java
java Main

About

assignments related to Programming in Java (PIJ)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages