Skip to content

sahil-shefeek/jarpository

Repository files navigation

Jarpository

Pre-Tested Java programs for KTU University Students

Introduction

Jarpository is a collection of Java programs aimed at assisting students of KTU (Kerala Technological University) in their learning of Java programming. This repository contains pre-tested, functional Java programs that cover various concepts, making it a valuable resource for assignments, projects, and exams.

Table of Contents

Features

  • Tested Programs: All programs within this repository are rigorously tested to ensure their correctness.
  • Diverse Collection: The repository encompasses a wide array of Java programs that are commonly encountered in the KTU university curriculum.
  • Readable and Clear: Each program is well-documented and organized, enhancing its comprehensibility for learners.

Navigation

Navigating through the repository is made easy through thoughtful organization.

The directory structure of Jarpository follows a clear hierarchy. Here is an outline of this structure, arranged from the most to the least significant level:

Priority Level Concept
1 Files
2 Exception Handling
3 OOP+
(Abstraction, Encapsulation, Inheritance, Polymorphism)
4 OOP basics:
Classes, Objects and methods
5 Strings
6 Arrays
7 Functions
8 Loops and Conditional Statements
9 Flow Control (switch, if, else, etc.)
10 Miscellaneous Concepts

Each priority level corresponds to a dedicated directory or folder. Certain levels may have subdirectories to represent closely related concepts.

Example Usage

Suppose you're searching for a Java program that covers:

a) Inheritance, b) Polymorphism, and c) Exception Handling.

In this case, you can efficiently navigate the repository's structure as follows:

  1. Inheritance: Begin by exploring the inheritance directory as it has higher priority.

  2. Polymorphism: After reviewing inheritance, proceed to the polymorphism directory.

  3. Exception Handling: Finally, navigate to the exception_handling directory that contains programs related to exception handling.

Following this path will lead you to: Inheritance > Polymorphism > ExceptionProgram.java

Setup

To make use of the programs within this repository, you should have a Java Development Kit (JDK) installed on your system. Follow these steps to get started:

  1. Clone this repository to your local machine:

    git clone https://github.com/sahil-shefeek/jarpository.git
  2. Navigate to the repository's directory:

    cd jarpository
  3. Compile and run any program using the Java compiler. For instance, to compile and run the program named Program.java, use these commands:

    javac Program.java
    java Program

Each program is stored in a separate file with a descriptive name. To use a specific program:

  1. Open the program file (e.g., Program.java) with a text editor.

  2. Study the comments and code to grasp the program's purpose and functionality.

  3. Modify the code if necessary or use it as a reference for your projects.

  4. Save your changes and follow the setup instructions above to compile and run the program.

Cleaner

When you run cleaner.sh from within the "jarpository" directory, it will scan for and list any .class files within the project directory and its subdirectories, giving you the option to delete them.

Usage

  1. Open a terminal and navigate to the project's root directory.

  2. Ensure the script has executable permissions. If it doesn't, grant them by running:

    chmod +x cleaner.sh
  3. Run the script by entering the following command:

    ./cleaner.sh
  4. The script will scan your project directory and list any Java bytecode (.class) files it finds, including those in subdirectories. You will be prompted with the following message:

    Do you want to delete the listed .class files? (yes/no):
    

    Enter "yes" (or any variation) to confirm and delete the listed .class files. Alternatively, enter "no" to cancel the deletion.

    The script will proceed to delete the selected .class files if you confirm.

Contribution

Contributions to Jarpository are encouraged and welcome! If you're interested in contributing, follow these steps:

  1. Fork the repository to your GitHub account.

  2. Create a new branch for the feature or bug you intend to work on.

  3. Implement and test your changes thoroughly.

  4. Commit your changes with a descriptive commit message.

  5. Push your branch to your forked repository.

  6. Open a pull request in the main repository, detailing the changes you've made.

About

A valuable resource of pre-tested Java programs aiding in assignments, projects, and exams.

Topics

Resources

Stars

Watchers

Forks

Contributors