|
1 | | -# Java-Programming-Exercises |
2 | | -This repo contains the HTML code for portfolio |
| 1 | +# Java Programming Exercises |
| 2 | + |
| 3 | +This repository contains a series of basic Java programming exercises designed to help you learn and practice fundamental Java concepts. |
| 4 | + |
| 5 | +## Table of Contents |
| 6 | + |
| 7 | +1. [Task 01 - Setting Up Your First Java Program](#task-01---setting-up-your-first-java-program) |
| 8 | +2. [Task 02 - Declaring a Class and Main Method](#task-02---declaring-a-class-and-main-method) |
| 9 | +3. [Task 03 - Understanding Code Blocks and Statements](#task-03---understanding-code-blocks-and-statements) |
| 10 | +4. [Task 04 - Declaring Variables and Printing Their Values](#task-04---declaring-variables-and-printing-their-values) |
| 11 | +5. [Task 05 - Working with Primitive Data Types](#task-05---working-with-primitive-data-types) |
| 12 | +6. [Task 06 - Wrapper Classes and MIN/MAX Values](#task-06---wrapper-classes-and-minmax-values) |
| 13 | +7. [Task 07 - Demonstrating Overflow and Underflow](#task-07---demonstrating-overflow-and-underflow) |
| 14 | +8. [Task 08 - Working with Long and Double](#task-08---working-with-long-and-double) |
| 15 | +9. [Task 09 - Conversion between Types (Casting)](#task-09---conversion-between-types-casting) |
| 16 | +10. [Task 10 - Converting Pounds to Kilograms](#task-10---converting-pounds-to-kilograms) |
| 17 | +11. [Task 11 - Working with Char and Boolean](#task-11---working-with-char-and-boolean) |
| 18 | +12. [Task 12 - Basic Conditional Logic (if-else)](#task-12---basic-conditional-logic-if-else) |
| 19 | +13. [Task 13 - Using Ternary Operator](#task-13---using-ternary-operator) |
| 20 | +14. [Task 14 - Exploring Strings](#task-14---exploring-strings) |
| 21 | +15. [Task 15 - Conclusion and Cleanup](#task-15---conclusion-and-cleanup) |
| 22 | +16. [Task 16 - Simple Calculator](#task-16---simple-calculator) |
| 23 | +17. [Task 17 - Area and Perimeter of a Rectangle](#task-17---area-and-perimeter-of-a-rectangle) |
| 24 | +18. [Task 18 - Temperature Converter (Celsius to Fahrenheit)](#task-18---temperature-converter-celsius-to-fahrenheit) |
| 25 | +19. [Task 19 - Sum of Digits](#task-19---sum-of-digits) |
| 26 | +20. [Task 20 - Grade Calculator](#task-20---grade-calculator) |
| 27 | + |
| 28 | +## Task Descriptions |
| 29 | + |
| 30 | +### Task 01 - Setting Up Your First Java Program |
| 31 | +Learn how to set up a basic Java program and run it successfully. |
| 32 | + |
| 33 | +### Task 02 - Declaring a Class and Main Method |
| 34 | +Understand how to declare a class in Java and define the `main` method. |
| 35 | + |
| 36 | +### Task 03 - Understanding Code Blocks and Statements |
| 37 | +Explore how Java code is structured using code blocks and statements. |
| 38 | + |
| 39 | +### Task 04 - Declaring Variables and Printing Their Values |
| 40 | +Practice declaring variables of different types and printing their values to the console. |
| 41 | + |
| 42 | +### Task 05 - Working with Primitive Data Types |
| 43 | +Get familiar with Java's primitive data types, such as `int`, `double`, `char`, and `boolean`. |
| 44 | + |
| 45 | +### Task 06 - Wrapper Classes and MIN/MAX Values |
| 46 | +Learn about wrapper classes in Java and how to retrieve the minimum and maximum values of data types. |
| 47 | + |
| 48 | +### Task 07 - Demonstrating Overflow and Underflow |
| 49 | +Experiment with overflow and underflow in numeric data types. |
| 50 | + |
| 51 | +### Task 08 - Working with Long and Double |
| 52 | +Work with larger numbers using `long` and floating-point numbers with `double`. |
| 53 | + |
| 54 | +### Task 09 - Conversion between Types (Casting) |
| 55 | +Practice type conversion (casting) between different data types in Java. |
| 56 | + |
| 57 | +### Task 10 - Converting Pounds to Kilograms |
| 58 | +Write a program to convert a given weight in pounds to kilograms. |
| 59 | + |
| 60 | +### Task 11 - Working with Char and Boolean |
| 61 | +Work with `char` and `boolean` data types and explore their usage. |
| 62 | + |
| 63 | +### Task 12 - Basic Conditional Logic (if-else) |
| 64 | +Implement basic conditional logic using `if-else` statements in Java. |
| 65 | + |
| 66 | +### Task 13 - Using Ternary Operator |
| 67 | +Learn how to use the ternary operator for concise conditional expressions. |
| 68 | + |
| 69 | +### Task 14 - Exploring Strings |
| 70 | +Dive into Java strings and practice various string manipulation techniques. |
| 71 | + |
| 72 | +### Task 15 - Conclusion and Cleanup |
| 73 | +Wrap up the basics and ensure your code is organized and clean. |
| 74 | + |
| 75 | +### Task 16 - Simple Calculator |
| 76 | +Create a simple calculator that performs basic arithmetic operations (addition, subtraction, multiplication, division). |
| 77 | + |
| 78 | +### Task 17 - Area and Perimeter of a Rectangle |
| 79 | +Write a program to calculate the area and perimeter of a rectangle given its length and width. |
| 80 | + |
| 81 | +### Task 18 - Temperature Converter (Celsius to Fahrenheit) |
| 82 | +Build a program to convert temperature from Celsius to Fahrenheit. |
| 83 | + |
| 84 | +### Task 19 - Sum of Digits |
| 85 | +Create a program that calculates the sum of the digits of a given integer. |
| 86 | + |
| 87 | +### Task 20 - Grade Calculator |
| 88 | +Write a program that calculates a student's grade based on input scores. |
| 89 | + |
| 90 | +## How to Run the Programs |
| 91 | + |
| 92 | +1. Ensure you have Java Development Kit (JDK) installed on your machine. |
| 93 | +2. Clone this repository: |
| 94 | + ```bash |
| 95 | + git clone https://github.com/faizan-ahmad5/Java-Programming-Exercises.git |
| 96 | + ``` |
| 97 | +3. Navigate to the project directory and open any Java file in your preferred IDE or text editor. |
| 98 | +4. Compile and run the programs using the following commands: |
| 99 | + ```bash |
| 100 | + javac TaskXX.java |
| 101 | + java TaskXX |
| 102 | + ``` |
| 103 | + |
| 104 | + |
0 commit comments