https://github.com/danielbatres/activity-one-java
Activity Number One - Indications: Create a project and within the project 12 classes will be generated that will correspond to the requested exercises
https://github.com/danielbatres/activity-one-java
exercises java practice
Last synced: over 1 year ago
JSON representation
Activity Number One - Indications: Create a project and within the project 12 classes will be generated that will correspond to the requested exercises
- Host: GitHub
- URL: https://github.com/danielbatres/activity-one-java
- Owner: danielbatres
- License: mit
- Created: 2022-08-09T23:10:27.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-13T01:31:03.000Z (almost 4 years ago)
- Last Synced: 2025-01-19T00:00:46.686Z (over 1 year ago)
- Topics: exercises, java, practice
- Language: Java
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Activity Number One Java
## Degree: Second Year in Sotware Development "A" and "B"
## Daniel García Batres #13 "B"
Indications: Create a project and within the project 12 classes will be generated that will correspond
to the requested exercises
1. Create a class that prints the sum of two numbers if they are equal and calculates the product of
both are different.
[Exercise N°1 Class](https://github.com/danielbatres/activity-one-java/blob/main/src/Exercise/Exercise1.java)
2. Create a class that calculates the area of a rectangle, print results.
[Exercise N°2 Class](https://github.com/danielbatres/activity-one-java/blob/main/src/Exercise/Exercise2.java)
3. Create a class that calculates the hypotenuse of a triangle (research the functions to get
square root and powers)
[Exercise N°3 Class](https://github.com/danielbatres/activity-one-java/blob/main/src/Exercise/Exercise3.java)
4. Create a java application that, based on an employee's salary, calculates the discount of the
income, verify if said discount can be applied (According to the table, it will be assumed that the salary is
monthly). Show on the screen the total salary that the employee will receive.
[Exercise N°4 Class](https://github.com/danielbatres/activity-one-java/blob/main/src/Exercise/Exercise4.java)
5. Create a java application that allows you to calculate the factorial of an integer.
[Exercise N°5 Class](https://github.com/danielbatres/activity-one-java/blob/main/src/Exercise/Exercise5.java)
6. Create a java application that prints the first 100 prime numbers.
[Exercise N°6 Class](https://github.com/danielbatres/activity-one-java/blob/main/src/Exercise/Exercise6.java)
7. Make a solution that prints “even” or “odd” after you have read and verified a
whole number.
[Exercise N°7 Class](https://github.com/danielbatres/activity-one-java/blob/main/src/Exercise/Exercise7.java)
8. Given the coordinates of a point in the Cartesian plane, display a message indicating in
which quadrant is located, if it is on the x-axis, y-axis, or at the origin.
[Exercise N°8 Class](https://github.com/danielbatres/activity-one-java/blob/main/src/Exercise/Exercise8.java)
10. In a cinema there is a 50% discount on the value of the ticket for people over 60
years and those under 18 years of age, the rest of the people pay the amount without discount. given the age
of the person and the price of the ticket, calculate how much a person will pay for their ticket.
[Exercise N°9 Class](https://github.com/danielbatres/activity-one-java/blob/main/src/Exercise/Exercise9.java)
11. Given the name of the client, and the value of the purchase, calculate the amount to pay considering the
following: If the purchase is less than or equal to $75.00, there is NO discount. If the purchase is greater than
$75.00, you have a 5% discount If the purchase is greater than $150.00, you have a 10% discount
The name of the client, the value of the purchase and the actual amount to be paid must be printed.
[Exercise N°10 Class](https://github.com/danielbatres/activity-one-java/blob/main/src/Exercise/Exercise10.java)
12. You want to calculate the salary of a worker, taking the hours worked during the week
and the type of position you perform, design the solution that allows you to display the data of the
employee and his weekly salary, knowing that the class A worker is paid $7.00/hour, the class B
$8.50, class C $10.00 and class D $12.50.
[Exercise N°11 Class](https://github.com/danielbatres/activity-one-java/blob/main/src/Exercise/Exercise11.java)
13. Design a solution that, given the grades of a group of students (whose number is known)
calculate and print the average grade.
[Exercise N°12 Class](https://github.com/danielbatres/activity-one-java/blob/main/src/Exercise/Exercise12.java)