Skip to content

This repository contains all the Java programs that I have executed for my OODJ Course in my 2nd Year of Computer Science Undergrad program at Dayananda Sagar University, Bengaluru, India in Q1 2022.

Notifications You must be signed in to change notification settings

rexgraystone/oodj

Repository files navigation

Object Oriented Programming and Development with Java

This repository contains all the Java programs that I have executed for my Object Oriented Programming and Development with Java Course in my 2nd Year of Computer Science Undergrad program at Dayananda Sagar University, Bengaluru, India in Q1 2022.

List of Programs

Serial No. C File Name Description
1 1_electricityBill.java This program calculates the electricity bill for a given number of units.
2 2_moveZeros.java This program moves all the zeros to the end of an array.
3 3_nonRepeatingChar.java This program finds the first non-repeating character in an array.
4 4_salary.java This program demonstrates the concept of inheritance in Java.
5 5_methodOverloading.java This program demonstrates the concept of method overloading in Java.
6 6_garbageCollection.java This program demonstrates the concept of garbage collection in Java.
7 7_polymorphismFunction.java This program demonstrates the concept of polymorphism in Java.
8 8_exceptionHandlingFunc.java This program demonstrates the concept of exception handling in Java.
9 9_multiThreading.java This program demonstrates the concept of multi-threading in Java.
10 10_JTableP.java This program implements a JTable in Java.
11 11_buildGUI.java This program implements a JFrame in Java.
12 12_Database.java This program implements a database and database operations in Java.

How to Run

  1. Ensure that you have Java installed on your system.

    java -version

    It should look something like this Java Version

    If you don't have Java installed, you can download it from here.

    • To install Java on Ubuntu, you can follow this tutorial.

    • To install Java on macOS, you can follow this tutorial.

    • To install Java on Windows, you can follow this tutorial.

  2. Clone the repository to your local machine using the following command.

    gh repo clone rexgraystone/oodj

    or

    git clone https://github.com/rexgraystone/oodj.git
  3. Navigate to the directory where you cloned the repository.

    cd oodj
  4. Compile the Java program using the following command.

    javac <Serial Number>_<Java File Name>.java

    For example, to compile the first program, you can use the following command.

    javac 1_Electricity.java

    The serial number is the number in the first column of the table above.

  5. Run the Java program using the following command.

    java <Java File Name>.class

    For example, to run the first program, you can use the following command.

    java 1_Electricity.class

Note

The programs are written in Java and compiled using the JDK version 17.0.2. on macOS Monterey 12.0.1.

About

This repository contains all the Java programs that I have executed for my OODJ Course in my 2nd Year of Computer Science Undergrad program at Dayananda Sagar University, Bengaluru, India in Q1 2022.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages