Question: JUnit test neeeded for this program: package PhotoFrame; import javax.swing. * ; import java.awt. * ; import java.awt.event. * ; public class JPhotoFrame extends JFrame
JUnit test neeeded for this program:
package PhotoFrame;
import javax.swing.;
import java.awt.;
import java.awt.event.;
public class JPhotoFrame extends JFrame implements ItemListener
FlowLayout flow new FlowLayout;
JCheckBox locBox new JCheckBoxOn location", false;
JCheckBox studioBox new JCheckBoxIn studio", false;
JCheckBox oneBox new JCheckBoxOne human subject false;
JCheckBox moreBox new JCheckBoxTwo or more human subjects false;
JCheckBox petBox new JCheckBoxPet subject false;
JLabel mainLabel new JLabelPaulas Portaits";
Font font new FontArial Font.ITALIC, ;
JLabel label new JLabelPortrait fee";
JLabel label new JLabelSelect options";
JTextField totPrice new JTextField;
String output;
final double LOCPRICE ;
double ONEHUMANSUBJECTPRICE MOREHUMANSUBJECTSPRICE ;
double PETSUBJECTPRICE ;
double locPrice ;
double subPrice ;
public JPhotoFrame
setTitlePhotoFrame;
setLayoutflow;
addmainLabel;
addlabel;
ButtonGroup gp new ButtonGroup;
gpaddlocBox;
gpaddstudioBox;
locBox.addItemListenerthis;
addlocBox;
studioBox.addItemListenerthis;
addstudioBox;
oneBox.addItemListenerthis;
addoneBox;
moreBox.addItemListenerthis;
addmoreBox;
petBox.addItemListenerthis;
addpetBox;
addlabel;
addtotPrice;
setVisibletrue;
@Override
public void itemStateChangedItemEvent check
subPrice ;
if studioBoxisSelected
subPrice subPrice ;
else if locBoxisSelected
subPrice subPrice LOCPRICE;
if oneBoxisSelected
subPrice subPrice ONEHUMANSUBJECTPRICE;
if moreBoxisSelected
subPrice subPrice MOREHUMANSUBJECTSPRICE;
if petBoxisSelected
subPrice subPrice PETSUBJECTPRICE;
totPrice.setTextStringformatf subPrice;
public static void mainString args
JPhotoFrame frame new JPhotoFrame;
frame.setSize;
frame.setVisibletrue;
frame.setDefaultCloseOperationJFrameEXITONCLOSE;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
