Skip to content

ironhack-labs/lab-java-basics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

logo_ironhack_blue 7

LAB | Java Basics

Instructions

  1. Fork this repo.
  2. Clone your fork to your local machine.
  3. Solve the challenges.

Deliverables

  • Upon completion, add your solution to git.
  • Then commit to git and push to your repo on GitHub.
  • Make a pull request and paste the pull request link in the submission field in the Student Portal.

Tasks

  1. Write a method in Java to get the difference between the largest and smallest values in an array of integers. The length of the array must be 1 and above. Use loops and conditionals to develop the algorithm.
  2. Write a method in Java to find the smallest and second smallest elements of a given array and print it in the console. Use loops and conditionals to develop the algorithm.
  3. Create an Employee class to represent an employee of a company. Add all relevant properties and behaviors that you might need but you have to include a salary property. Don't forget to add getters and setters.
  4. Create an Intern class that extends from Employee. All the Interns have a salary limit of 20000 (constant). You must validate if an intern is created (or salary updated) with a bigger salary than the max. The max value is set.
  5. Write a program that creates 10 Employees and print it al the properties.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published