Skip to content

ZCW-J100D50/Java-Quiz-9-3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Quiz 9-3

Overview

  • This quiz has 2 sections.
    1. fundamentals
      • Calculator
      • StringUtils
    2. arrays
      • ArrayUtils


Section 1 - Fundamentals

Calculator

  • Description
    • The purpose of this class is to create a simple calculator.
  • Methods to Complete
    • Double add(Double val1, Double val2)
      • return the sum of val1 and val2
    • Double subtract(Double val1, Double val2)
      • return the difference of val1 and val2
    • Double divide(Double val1, Double val2)
      • return the quotient of val1 and val2
    • Double squareRoute(Double value)
      • return the square root of value
    • Double square(Double value)
      • return the square of value
    • Double[] squareRoutes(Double[] values)
      • return an array of Double, containing the square root of each of the elements in values.
    • Double[] squares(Double[] values)
      • return an array of Double, containing the square of each of the elements in values.

StringUtils

  • Description
    • The purpose of this class is to create utility String methods
  • Methods to Complete
    • String getMiddleCharacter(String string)
      • return character at index string.length()/2 as String.
    • String capitalizeMiddleCharacter(String string)
      • return near-identical String with character at index string.length()/2 capitalized.
    • String lowercaseMiddleCharacter(String string)
      • return near-identical String with character at index string.length()/2 lowercased.
    • String invertCasing(String string)
      • return near-identical String with each character's casing inverted: Capital letters become lowercase, lowercase letters become lowercase.
    • Boolean hasDuplicateConsecutiveCharacters(String string)
      • return true if string contains two identical characters in adjacent indices.
    • Boolean removeDuplicateConsecutiveCharacters(String string)
      • return near-identical String with each occurrence of duplicate-adjacent characters removed.
    • Boolean isIsogram(String string)
      • return true if each Character in string occurs exactly 1 time.


Section 2 - Arrays

ArrayUtils

  • Description
    • The purpose of this class is to create a utility for manipulating arrays.
  • Methods to Complete
    • String getMiddleElement(String[] values)
      • return the element at index values.length/2
    • String[] removeMiddleElement(String[] values)
      • return near-identical array with element at index values.length/2 removed.
    • String getLastElement(String[] values)
      • return element at index values.length-1
    • String[] removeLastElement(String[] values)
      • return near-identical array with element at index values.length-1 removed.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages