Dear Programmers,
I have been trying to get the following program : 'Flowers' to run.
It is meant to run off a group of subclasses to abstract class Flower.
I have been getting the following output to the console, though:-
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\simon.BLUECHIP-KDOCDA>cd c:\lab_files\Lesson_3
C:\lab_files\Lesson_3>set PATH=c:\Sun\AppServer\jdk\bin;%PATH%
C:\lab_files\Lesson_3>javac Flowers.java
Flowers.java:19: unreachable statement
break;
^
Flowers.java:22: unreachable statement
break;
^
Flowers.java:25: unreachable statement
break;
^
Flowers.java:28: unreachable statement
break;
^
Flowers.java:31: unreachable statement
break;
^
Flowers.java:35: missing return statement
}
^
6 errors
C:\lab_files\Lesson_3>
I take it therefore that the switch statment is amiss, somehow?
If so, then the error must lie with the two 'for' loops, which compiler okays now, but didn't previously.
Hoping you might be able to give me a clue.
Thank you for your attention.
Yours
Simon.
code follows:-