Commit 8ed95ff7 authored by Invate's avatar Invate

first

parent c899adb3
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
public class AssessmentPartFour { public class AssessmentPartFour {
List<String> morseCode = new ArrayList<String>();
public int loadMorseFromFile(String filename)
{
return 0;
}
public String translateMorse()
{
return "";
}
List<String> morseCode = new ArrayList<String>();
public int loadMorseFromFile(String filename)
{
try (BufferedReader br = new BufferedReader(new FileReader(filename)))
{
while (br.ready())
{
morseCode.add(br.readLine());
}
}
catch (FileNotFoundException e)
{
}
catch (IOException e)
{
}
int number = morseCode.size();
return number;
}
public String translateMorse()
{
return "";
} }
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment