Take the following list of methods: Student () { // Creates a student object with all fields blank } Student (String name) { // Creates a student object with a set name } Student (String name, Array []) { } power (int x) { // returns x^2 } power (int x, int y) { // returns x^y } greet (String name) { // returns "Hello, " + name + "!"; } a) What are your options if you want to find the value of a number squared? Which would you choose if you wanted the method to say something to the user? b) What 'Student' would you call if you want to create a student when you don't have any input? c) What 'Student' would you call if you had a whole array of data to input into the student object? d) Why do you think this is a capability that Java has? What uses can you imagine for it?

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Modularization Techniques
Section: Chapter Questions
Problem 1GZ
icon
Related questions
Question
Take the following list of methods:
Student ()
{
// Creates a student object with all fields blank
Student (String name)
{
// Creates a student object with a set name
}
Student (String name, Array [])
{
}
power (int x)
{
// returns x^2
}
power (int x, int y)
{
// returns x^y
}
greet (String name).
{
// returns "Hello, + name + " !";
}
"1
a) What are your options if you want to find the value of a number squared? Which would you
choose if you wanted the method to say something to the user?
b) What 'Student' would you call if you want to create a student when you don't have any
input?
c) What 'Student' would you call if you had a whole array of data to input into the student
object?
d) Why do you think this is a capability that Java has? What uses can you imagine for it?
Transcribed Image Text:Take the following list of methods: Student () { // Creates a student object with all fields blank Student (String name) { // Creates a student object with a set name } Student (String name, Array []) { } power (int x) { // returns x^2 } power (int x, int y) { // returns x^y } greet (String name). { // returns "Hello, + name + " !"; } "1 a) What are your options if you want to find the value of a number squared? Which would you choose if you wanted the method to say something to the user? b) What 'Student' would you call if you want to create a student when you don't have any input? c) What 'Student' would you call if you had a whole array of data to input into the student object? d) Why do you think this is a capability that Java has? What uses can you imagine for it?
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Array
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
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
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,