id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

amjadm@miamioh.edu assignment3 > isId
prev  |  next  |  chance

Each employee has an id number in "BBB" company. The id is a 10 digit number, holding the following information from left to right: * The first 2 digits are the year in which the employee was hired [00-99]. * The next 2 digits are the department [01-20]. * The next 2 digits are the position of the employee [10-90] * The next 2 digits are employee's birthday month [01-12] * The next 2 digits are employee's birthday year [00-99] Return true if the given string is a correct id number.


isId("11111") → false
isId("") → false
isId("1005210970") → true

...Save, Compile, Run (ctrl-enter)

public boolean isId(String str) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 105

Copyright Nick Parlante 2017 - privacy