Skip to content

fullstack-online-classroom/class09-classroom-java-vs-tests-java-vs-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Java VS Tests

Goal

Your goal is to upgrade and improve your understanding of Java syntax through practice. To do that, you will also apply and understand object-oriented programming concepts in Java by creating and implementing methods, manipulating objects, and creating program logic according to external requirements in the form of tests.

Skills

By doing this assignment you will:

  • Create classes and define methods with Java
  • Get familiar with string manipulation and regular expressions
  • Apply recursive and iterative algorithms to your solution in Java
  • Learn how to use getters and setters to access and modify object properties
  • Use constructors to initialise objects with default and custom values
  • Declare methods and use return values to perform specific tasks in your program
  • Utilize loops to iterate over arrays and manipulate array elements
  • Understand the difference between primitive and reference Java types

Instructions

Your task is to implement the Ai class. This class should not use the default constructor. Ai must have two properties, both strings: creationDate and name. Your custom constructor should set values to those properties. The class also needs to have the necessary getters and setters for both instance variables.

Class Ai also has to include the following methods:

  • doubleArray — takes an int array as an argument and returns a new array with all values doubled
  • factorialIterative — takes an int as an argument and returns the factorial of that int using an iterative approach
  • factorialRecursive — takes an int as an argument and returns the factorial of that int using a recursive approach
  • palindromeReplace — takes a String as an argument and returns a new String with all the occurrences of words that are palindromes replaced with the word “palindrome”
  • emailValidator — takes no arguments and returns a string with a regex expression to validate emails

When you’re finished, you should create a Playground class. This class should be able to demonstrate the functionality of the Ai class by instantiating one or more AI objects, invoking its methods, and displaying the results in the console.

About

class09-classroom-java-vs-tests-java-vs-tests created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages