Devam Ediyor

486600 Java: inheritance and simple gui

STEP 1: InheritanceTest (20 points)

Write a program called [url removed, login to view] to support an inheritance hierarchy for class Point–Square–Cube. Use Point as the superclass of the hierarchy. Specify the instance variables and methods for each class. The private data of Point should be the x-y coordinates, the private data of Square should be the sideLength, the private data of Cube should be depth. Provide applicable accessor methods, mutator methods, toString() methods, area() method and volume() method to all classes. Write a program that instantiates objects of your classes, test all instance methods and outputs each object's area and volume when appropriate.

STEP 2: DayGui (10 points)

Write a program called [url removed, login to view] that creates a GUI having the following properties:

Object

Property

Setting

JFrame

Name

Caption

Layout

mainFrame

Messages

FlowLayout

JButton

Name

Caption

Mnemonic

cmdGood

Good

G

JButton

Name

Caption

Mnemonic

cmdBad

Bad

B

Add individual event handlers to the your program so that when a user clicks the Good button, the message Today is a good day! appears in a dialog box, and when the Bad button is clicked, the message I'm having a bad day today! is displayed. The following tutorial shows you much of the code solution. Feel free to use the tutorial, but make changes so that it you are not simply copying the tutorial code for your entire solution.

[url removed, login to view] tutorial

3:13, [url removed, login to view]

STEP 3: OfficeAreaCalculator (10 points)

Write a program called [url removed, login to view] that displays the following prompts using two label components:

Enter the length of the office:

Enter the width of the office:

Have your program accept the user input in two text fields. When a button is clicked, your program should calculate the area of the office and display the area in a text field. This display should be cleared whenever the input text fields receive the focus. A second button should be provided to terminate the application (Exit button). The following tutorial shows you much of the code solution. Feel free to use the tutorial, but make changes so that it you are not simply copying the tutorial code for your your entire solution.

Beceriler: Her şey Kabul, Java

Daha fazlasını görün: tutorial solution, solution tutorial, good and the bad, 3m, inheritancetest java input, mainframe tutorial, simple text layout, java to c, java free, free java, simple java box, java calculate, java jframe application, message simple text, java program simple, java text message, gui layout, simple layout program, using program java, simple program layout, java test program, java simple class, display cube, java add data, today good day java

İşveren Hakkında:
( 8 değerlendirme )

Proje NO: #2232510

Seçilen:

ancosys

Hey, Please check pm. Thanks!

2 gün içinde 30$ USD
(93 Değerlendirme)
5.7