Jump to content

Pls Help


kb24

Recommended Posts

Posted

Use the 6 steps to create a program that uses 2 Dialog boxes to prompt the user for 2 integers then print:• The sum• The difference(take the second number from the first)• The product• Raise the first number to the power of the second using Maths.pow methodMind post me the coding?

  • 2 weeks later...
Posted

I will just give a rough coding, you've got to earn it though.public class MyClass { // Constructor public MyClass(int x, int y) { int x; int y; }// methods public int getSum (int x, int y) { // method goes here return z; } public void addSum () { // method goes here return z; } public void addPower() { } etc... public static void main(String[] args) { int dialog1 = JDialog.showInputDialog(null; "Type here"); int dialog2 = JDialog.showInputDialog(null; "Type here"); MyClass xt = new MyClass (dialog1, dialog2); methodAdd(); ... methodRaise(); }}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...