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>(); List<String> morseCode = new ArrayList<String>();
public int loadMorseFromFile(String filename) public int loadMorseFromFile(String filename)
{
try (BufferedReader br = new BufferedReader(new FileReader(filename)))
{ {
while (br.ready())
return 0; {
morseCode.add(br.readLine());
} }
}
public String translateMorse() catch (FileNotFoundException e)
{ {
return "";
} }
catch (IOException e)
{
}
int number = morseCode.size();
return number;
}
public String translateMorse()
{
return "";
}
......
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