Question: . Program Structure Exam 2 M _ Locklear > IA JRE System Library [ JavaSE - 1 7 ] sic ( checkmark

.
Program Structure
Exam2M_Locklear
> IA JRE System Library [JavaSE-17] sic
\(\checkmark \) locklear.CLASSES
\(>\lceil \) ImperialWidget.java
> Widget_Alpha.java
> W Widget_Beta.java
>\(\Omega \) Widget_Gamma.java
locklear.ENUMS
> WidgetType.java
locklear.INTERFACE
> Displaying.java
> Widgetable.java
\# locklear.MAIN
Gene.java
Structure your program and main method EXACTLY as shown...YOU MUST replace my name with yours where appropriate
```
public class Gene {
public static void main(String[] args){
WidgetType[] widgets = WidgetType.values();
ArrayList W = Widgetable.widgetBuilder(1, widgets);
for(ImperialWidget w: W){
if(w.getWidgetType().equals(WidgetType.Alpha)){
((Widget_Alpha)w).displayWidget();
}
if(w.getWidgetType().equals(WidgetType.Beta)){
((Widget_Beta)w).displayWidget();
}
if(w.getWidgetType().equals(WidgetType.Gamma)){
((Widget_Gamma)w).displayWidget();
}
l
}
}
``` ImperialWidget
-WidgetType = WidgetType. Alpha
Widget_Alpha()
>
+static generateWidgetCode(WidgetType t): String
+static widgetBuilder(int widgetCount, WidgetType[] widgetTypes): ArrayList
A WidgetID is formatted as shown below
Square Root of the current widgetCount
\(\overbrace{4}^{\text {Square }}\)
Alpha-3.74A-9_8
WidgetType
ONLY this part is created by the generateWidgetCode Method Expected Output
2. Problems @ Javadoc (18) Declaration EConsole \(\times \) Gene (22)[Java Application] C:IUsers\msgthl.p21pool/pluginslorg.eclipse.justj.open)
Alph Class Widget
Alpha-3.61A-8_1
Beta Class Widget
Beta-3.74B-2_2
Gamma Class Widget
Gamma-3.87G-6_7
. Program Structure Exam 2 M _ Locklear > IA JRE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!