Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please follow ALL instructions Programming Assignment 4 Using NetBeans, write a class called 10, in a package called util, containing the methods: getinput(String) getConsolelnput(String), showMessage(String)
please follow ALL instructions Programming Assignment 4 Using NetBeans, write a class called 10, in a package called util, containing the methods: getinput(String) getConsolelnput(String), showMessage(String) and showMessage(String, String). The method getInput will be as above; getConsolelnput will do the same but will ask for input from the console and will return a Scanner object. The first showMessage method will be as above; the second will do the same but will also accept a title for the output dialog. Then write a program using the 10 class but in a separate file and in the default package. Your program will first ask the user to enter 2 integers. If both are positive, print the sum. Then it asks for 2 real numbers (float or double); if only one is negative, print the product of the two numbers, if both are negative, print the quotient. Use nested it's where possible. Output must be formatted. All input and output must be done through the methods. All output is to the console and dialog. Good program structure, indentation, a heading and comments are required. Please follow the instructions exactly as given
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started