Skip to content

nurulashraf/java-basics-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UniRazak Fundamental of Programming Java - Exercise 1

Welcome to the ur-fop-jav-ex1 repository! This project is a collection of Java exercises aimed at helping beginners understand the fundamentals of programming. It is an excellent resource for students or anyone looking to strengthen their Java programming skills.

Table of Contents

  1. Overview
  2. Features
  3. Structure
  4. Prerequisites
  5. How to Use
  6. Questions PDF
  7. Contribution Guidelines
  8. License

Overview

This repository was created as part of a foundational programming course. It focuses on essential programming principles like data types, control structures, loops, methods, and object-oriented programming concepts. The exercises are designed to build proficiency in Java programming step by step.


Features

  • Hands-On Exercises: Includes practical exercises to reinforce learning.
  • Organised Structure: Files are clearly separated into source code and compiled binaries.
  • Beginner-Friendly: Designed for those new to Java programming.
  • Real-World Examples: Exercises demonstrate concepts through relatable scenarios.
  • Extensible: Contributions are welcome to expand and improve the content.

Structure

The repository contains two main folders:

  • src: Contains the source code files (.java) for all exercises. Editable and viewable in any text editor or IDE.
  • bin: Contains the compiled class files (.class). These are the executable versions of the programs.

Available Exercises

Each folder includes the following exercises:

  1. ArithmeticCalculations
  2. CelsiusToFahrenheit
  3. CuboidVolume
  4. FahrenheitToCelsius
  5. InchesToCentimeters
  6. MetersToInches
  7. RectangleArea
  8. StringOutput
  9. UserInputCalculations

Prerequisites

To work with this repository, ensure the following are set up:

  1. Java Development Kit (JDK): Version 8 or above.
  2. IDE/Text Editor: Any Java-compatible IDE (e.g., IntelliJ IDEA, Eclipse, NetBeans) or a basic text editor.
  3. Basic knowledge of how to compile and run Java programs.

How to Use

  1. Clone the repository:

    git clone https://github.com/nurulashraf/ur-fop-jav-ex1.git
  2. Navigate to the repository folder:

    cd ur-fop-jav-ex1
  3. Open the src folder in your IDE or text editor to view and edit the source code.

  4. To run an exercise, navigate to the src folder and compile the desired .java file:

    javac ArithmeticCalculations.java

    Then run the compiled program:

    java ArithmeticCalculations
  5. Use the bin folder to directly run the compiled .class files if needed.


Questions PDF

The repository also includes a PDF file named Questions.pdf, which provides the requirements and descriptions for each exercise. This document serves as a guide to understand what each program is supposed to achieve. Refer to this file to get a clear idea of the objectives and expected outputs for each task.


Contribution Guidelines

Contributions are encouraged! If you'd like to improve this repository or add new exercises, follow these steps:

  1. Fork the repository.
  2. Create a branch for your updates:
    git checkout -b feature/new-exercise
  3. Commit your changes:
    git commit -m "Added a new exercise on [topic]"
  4. Push your branch:
    git push origin feature/new-exercise
  5. Open a Pull Request.

Please ensure your code is well-documented and formatted.


License

This repository is licensed under the MIT License. The MIT License was chosen to provide users with the flexibility to use, modify, and distribute the code freely. It encourages collaboration and sharing while requiring credit to the original creator. This permissive licensing makes it suitable for educational and open-source projects.


Happy coding! For any issues or questions, feel free to open an issue in the repository.