{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

RoomAreas.java - import javax.swing.JOptionPane public...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import javax.swing.JOptionPane; public class RoomAreas { public static void main(String []args) { double number; double totalArea; String input; Rectangle kitchen =new Rectangle(); Rectangle bedroom =new Rectangle(); Rectangle den = new Rectangle(); input = JOptionPane.showInputDialog("what is the width of the kitchen ?"); number= Double.parseDouble(input); kitchen.setWidth(number); input = JOptionPane.showInputDialog("what is the length of the kitchen ?"); number= Double.parseDouble(input); kitchen.setLength(number); input = JOptionPane.showInputDialog("what is the width of the bedroom ?"); number= Double.parseDouble(input); bedroom.setWidth(number);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}