• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

ZipCodeCore/Maven.Quiz4

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

ZipCodeCore/Maven.Quiz4

开源软件地址(OpenSource Url):

https://github.com/ZipCodeCore/Maven.Quiz4

开源编程语言(OpenSource Language):

Java 100.0%

开源软件介绍(OpenSource Introduction):

Quiz 4

Overview

  • This quiz has 4 sections.
    1. fundamentals
      • Calculator
      • StringUtils
    2. arrays
      • ArrayUtils
    3. object orientation - Difficult
      • Account
      • BankAccount
      • Bank
      • Transactable
      • Employee
      • Worker
    4. collections
      • WordCounter
      • Food - Difficult
      • Curry
      • Pepper
      • Spice
      • Ginger


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.


Section 3 - Object Orientation

Account

  • Description
    • The purpose of this class is to create a model of an Account.
  • Methods to Complete
    • Long getId()
    • void setId(Long id)

BankAccount

  • Description
    • The purpose of this class is to create a subclass of an Account which implements Transactable.
  • Methods to Complete
    • void setBalance(Double double)

Bank

  • Description
    • The purpose of this class is to create an encapsulation of a Collection of BankAccount objects.
  • Methods to Complete
    • BankAccount removeBankAccountByIndex(Integer indexNumber)
    • void addBankAccount(BankAccount bankAccount)
    • Boolean containsBankAccount(BankAccount bankAccount)

Employee

  • Description
    • The purpose of this class is to create an implementation of a Worker and Transactable which can deposit, withdrawal, and getBalance, of its composite BankAccount.
  • Methods to Complete
    • BankAccount getBankAccount()
    • void setBankAccount(BankAccount bankAccount)

Transactable

  • Description
    • The purpose of this interface is to ensure a class can deposit, withdrawal, and getBalance.
  • Methods to Complete
    • void deposit(Double amountToIncreaseBy)
    • void withdrawal(Double amountToDecreaseBy)
    • Double getBalance()

Worker

  • Description
    • The purpose of this interface is to ensure a class has BankAccount
  • Methods to Complete
    • BankAccount getBankAccount()
    • void setBankAccount(BankAccount bankAccount)


Section 4 - Collections

Word Counter

  • Description
    • The purpose of this class is to manage a mapping of String to Integer.
    • The class should be able to identify the number times a word has occurred in a given String array
      • A word is a series of characters delimited by spaces
  • Methods to Complete
    • Map<String, Integer> getWordCountMap()

Food

  • Description
    • The purpose of this class is to manage a list of Spice object.
    • The class should be able to identify the number of specific spice-type applied to an instance of a food.
  • Methods to Complete
    • List<Spice> getAllSpices()
    • <SpiceType extends Class<? extends Spice>> Map<SpiceType, Integer> getSpiceCount()
    • void applySpice(Spice spice)

Curry, Ginger, Pepper

  • Description
    • The purpose of this class is to create a concrete implementation of a Spice
  • Methods to Complete
    • String getName()



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
bringking/requirejs-maven-plugin: RequireJS optimizer for Maven发布时间:2022-08-17
下一篇:
brianwx5/Maven.Quiz3-1发布时间:2022-08-17
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap