Java 1
Java 1
Java Project
While inserting a new abbreviation to the data base, the program will check if the same abbreviation exists in the data
base or not. If it does, the program will NOT add this abbreviation to the data base a second time.
After checking over all the input, the program will write the data base to the screen as seen below:
A – C: ABR ADSL CBR BIT
D – F:
G– J: IOT JIT
K – N: NLP
O – R: PTT
S – V: ST VOY
W – Z: ZEX
Input:
Output:
NOTE: For each column there can be no more than 18 abbreviations. You do NOT need to check this in the input.
1
NOTE: Abbreviations will ALWAYS be given as capital letters and they will ALWAYS start with an English letter. You
need to check this in the input.
NOTE: YOU CANNOT USE ARRAYLISTS, LISTS OR THESE KIND OF MORE COMPLEX DATA
STRUCTURES IN THIS PROJECT.
HINT: For checking if a given String exists in the data base, it would be a good idea to write a method like
(doesExistInDB). Using such a method will reduce a lot of code repetition.
HINT: Do not forget to use the “.equals” method for comparing two Strings with each other.
HINT: If you cannot make the “checking if the String exists in the data base” you might get PARTIAL points. So, submit
your project.
Sample Input/Outputs:
Input Output
SQL AHT NFK IOS C64 SQL AHT STOP A – C: AHT C64
D – F:
G– J: IOS
K – N: NFK
O – R: PTT
S – V: SQL
W – Z:
HTTP CS SC TNG TOS DS9 SC DOS WIN STOP A – C: CS
D – F: DS9 DOS
G– J: HTTP
K – N:
O – R:
S – V: SC TNG TOS
W – Z: WIN