int char length, width, turn Method m = ite (true) n.main Menu (); cm. choice == m.askData (1; display ( m. goodbye D Main Method new Hath ReturnMethod m. instructions else if (m. choice == 15) == ³²=¹0¹)

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 20RQ
icon
Related questions
Question
Type
int
char
Return Method Parameter list
white (true)
{
ICS 3U- 16 Math Return Methods Timeline: 3 classes
length, width,
Variable Name
Main Method
MathReturn Method m = new Math ReturnMethod
{
m.main Menu ();
if (m. choice == >>
m. instructions
3else if (m. choice == JS) == ~= (0¹).
m.ask Data (1;
3
m. display (2)
goodbye Dj
Each student will be marked on the following
class name: reflects purpose of program
organization of the output screens & errortraps
algorithmic solution of process/errortraps KISS!!!
program executes correctly regardless of plan
proper program comments (following Programming Style)
proper methods, constructor and main method, a window title
uses Message or JOptionPane for error dialog boxes
private black box return method(s)
you may not create any extra java classes
correct programming of all errortraps -uncrashable!!!
proper access levels for all methods & variables.
output will be interesting and colourful with unique graphics!
English, grammar & output design!
10 (T)
Both sides must be signed BEFORE using a computer!
Black box Return Method
private int area Answer (char choice, int length, int width, int none)
{
area Answer = (length x width)
return area Answer;
Folder Name: Your Name 16
Transcribed Image Text:Type int char Return Method Parameter list white (true) { ICS 3U- 16 Math Return Methods Timeline: 3 classes length, width, Variable Name Main Method MathReturn Method m = new Math ReturnMethod { m.main Menu (); if (m. choice == >> m. instructions 3else if (m. choice == JS) == ~= (0¹). m.ask Data (1; 3 m. display (2) goodbye Dj Each student will be marked on the following class name: reflects purpose of program organization of the output screens & errortraps algorithmic solution of process/errortraps KISS!!! program executes correctly regardless of plan proper program comments (following Programming Style) proper methods, constructor and main method, a window title uses Message or JOptionPane for error dialog boxes private black box return method(s) you may not create any extra java classes correct programming of all errortraps -uncrashable!!! proper access levels for all methods & variables. output will be interesting and colourful with unique graphics! English, grammar & output design! 10 (T) Both sides must be signed BEFORE using a computer! Black box Return Method private int area Answer (char choice, int length, int width, int none) { area Answer = (length x width) return area Answer; Folder Name: Your Name 16
Write a program that calculates the area of a triangle, square or oval (without using any built-in math or String methods or
casting/transfer methods). You may only use the basic arithmetic operators: + -/*.The black box return method will be called
area (char, int, int, int). Your program should have nine methods: area, title, splashScreen, intructions (menu option),
pause Program, mainMenu, askData, display and a goodbye. All input must be errortrapped! Each major screen should be
indicated as a separate box with arrows to indicate program direction. Each errortrap will be shown separately in its own box with
arrows indicating the placement of the trap. Errortraps must be linked to a specific variable. Variables may have more than one
errortrap. The user may only exit in the mainMenu. The user may rerun the program until they choose to exit.
menu Write the OUTPUT SCREENS below and have this page initialled before continuing.
Calculation of the area.
to go to the instructions
1. Press
2. Press
3. Press
4. Press is to find the area of a square
5. Press o to find the area of a oval
to go to the program
to Pind the area of a triangle
Please enter
², ², 5, 6
instructionso;
This program is used to ask if you
want to find the area of a triangle,
Square and oval. It will ask to input
the appropriate. and the it will
calculate the area.
↓
Good Bye
Thank You for attending and participating in
you again. Bye.
the programme.
See
Ask Data();
Enter length: 6
Enter width: 6
19
Enter an integer please
length Entered: 6
width Entered: 6
Area of triangle: 36
J
display();
Transcribed Image Text:Write a program that calculates the area of a triangle, square or oval (without using any built-in math or String methods or casting/transfer methods). You may only use the basic arithmetic operators: + -/*.The black box return method will be called area (char, int, int, int). Your program should have nine methods: area, title, splashScreen, intructions (menu option), pause Program, mainMenu, askData, display and a goodbye. All input must be errortrapped! Each major screen should be indicated as a separate box with arrows to indicate program direction. Each errortrap will be shown separately in its own box with arrows indicating the placement of the trap. Errortraps must be linked to a specific variable. Variables may have more than one errortrap. The user may only exit in the mainMenu. The user may rerun the program until they choose to exit. menu Write the OUTPUT SCREENS below and have this page initialled before continuing. Calculation of the area. to go to the instructions 1. Press 2. Press 3. Press 4. Press is to find the area of a square 5. Press o to find the area of a oval to go to the program to Pind the area of a triangle Please enter ², ², 5, 6 instructionso; This program is used to ask if you want to find the area of a triangle, Square and oval. It will ask to input the appropriate. and the it will calculate the area. ↓ Good Bye Thank You for attending and participating in you again. Bye. the programme. See Ask Data(); Enter length: 6 Enter width: 6 19 Enter an integer please length Entered: 6 width Entered: 6 Area of triangle: 36 J display();
Expert Solution
steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT