A(n) __________ is a special variable that receives an argument when a method is called. a. reference variable b. argument variable c. parameter variable d. method variable
Q: c# Previously , you wrote a program named Hurricane that classified hurricanes into five categories…
A: Programming instructions: Create a class 'Hurricane'. In the main, prompt user to enter the wind…
Q: Herbert’s Home Repair estimates each job cost as the cost of materials plus $35 per hour while on…
A: import java.uti.Scanner; public class JobPricing{ public static void main(String[] args) {…
Q: write an application that calculates and display the weekly salary for an employee.the main()…
A: logic:- calculate overtime only when overtime hour is not zero otherwise display normal result by…
Q: c# uppose there is a method called Current Deposit is your project class. The method header is as…
A: we have to write a write one statement for the above prblem in which we will declare a variable call…
Q: Code a private method called days0fTheWeek that takes in a parameter day as a String. Based on the…
A: Program: public class Main { // This method returns the corresponding day for that Number.…
Q: Create a method that transforms a time given in seconds to a String that shows the hours, minutes,…
A: logic:- read totalSeconds p1=totalSeconds%60 (gives seconds) p2=totalSeconds/60 p3=p2%60…
Q: Hello, i need help with this question There are 12 inches in a foot and 3 feet in a yard. Create a…
A: import java.uti.Scanner; public class InchConversion{ public static void main(String[] args) {…
Q: If the method body has return C', what should be in the header: public static methodName (int a,…
A: Answer:
Q: A void method may contain a return statement in which form (assume x is int)? return x;…
A: This Code will not return anything because of main function as a void function,Compiler also gives…
Q: QUESTION 2 A prime number is a number that is evenly divisible only by itself and 1. For example,…
A: A prime number is a number that is evenly divisible only by itself and 1. For example, the number 5…
Q: To encourage good grades, Hermosa High School has decided to award each student a bookstore credit…
A: writing code in java import java.util.*; class CreditBookstore { public static void fun(String…
Q: C# Create an application for a library and name itFineForOverdueBooks. TheMain() method asks the…
A: Given:- Create an application for a library and name itFineForOverdueBooks. TheMain() method asks…
Q: Create two (2) overloaded methods that display a greeting message and use first name and last name…
A:
Q: need help creating this Java Program it has to match the sample run exactly thank you !…
A: import java.util.Scanner; public class Main{ public static double futureInvestmentValue(double…
Q: this assignment wants me : Herbert’s Home Repair estimates each job cost as the cost of materials…
A: Below is the modified java program: - Explanation: - In the given code, there are two errors that is…
Q: A parameter variable and a method's local variable can have the same name. True False
A: The local variable inside the method cannot have the same name as the parameter variable. Therefore,…
Q: Create a class named Commission that includes three variables: a double sales figure, a double…
A: Algorithm : Step 1 : declare class variables. computeCommission function : Parameters : double…
Q: Pass both variables to a method named computePercent() that displays the two values and the value of…
A: Required: Modify the Percentages application whose main() method holds two double variables.…
Q: When an object is falling because of gravity, the following formula can be used to determine the…
A: Note: Programming language is missing in the question. So we will answer this program in Java…
Q: Herbert’s Home Repair estimates each job cost as the cost of materials plus $35 per hour while on…
A: Code snippet:
Q: Question 2: A student will not be allowed to sit in exam if his/her attendance is less than 75%.…
A: According to the information given:- We have to follow the instruction and code to get desired…
Q: Àssume that a method with the header public static void methodA () is defined in a class named Main.…
A: public is an access specifier. You can make a method static by using the keyword static. Every…
Q: In the java.util package there is a class named Calendar. It has a method named getInstance, which…
A: first you need to import java.util.Calendar class create object of Calendar and call getInstance()…
Q: Write a standard mode application that calculates and displays the weekly salary for an employee.…
A: A required program is as follows, import java.util.Scanner; public class Salary { //Define the…
Q: Modify the class named InchConversion. Its main() method accepts a value in inches from a user at…
A: import java.util.Scanner; public class InchConversion { public static void main(String[] args) {…
Q: What does the signature of a method includes ? method name only method parameters only…
A: In signature of the method have includes:- Method name and parameter types
Q: create a class named checkup with fields that you read a patient number, blood pressure figures…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: interface B int a; void methodA(); O no problem the method needs to be public the variable a must be…
A: Interface is very similar to an abstract class where it consists of different methods and members…
Q: Part B-The Constructor and Method getVowels() (30 – 40 minutes) 1. Driver: Complete the constructor.…
A: Java code to find the vowels present in a given string
Q: A Moving to the next question prevents changes to this answer. Question 21 Assume that the following…
A: int x = 7; displayValue(x);
Q: You invoke a method by its name followed by a pair of brackets and the usual semi-colon, PLEASE USE…
A: Coded using C#.
Q: Activities: I. Write the proper method declaration/ method call for the following (Java Programming)…
A: Answers: 1. public static void CS(){ // statement } 2. CS(); 3. public static int IT(){//statement…
Q: Create a program named TipCalculation that includes two overloaded methods named DisplayTipInfo.…
A: Program approach: create a class define two overloaded method named DisplayTipInfo () one method…
Q: The terms in the formula are as follows: • P is the present value, or the amount that you need to…
A: PROGRAM: //Header file import java.util.*; //Defining class public class Main{ //Defining…
Q: Write a program (use value returning method) that prompts you to enter five scores. The program…
A: Given: Write a program (use value returning method) that prompts you to enter five scores. The…
Q: Methods with an empty parameter list and do not return a value: [Questions 1-8 required] You invoke…
A: Coded using C#.
Q: QUESTION 10 Multiple Choice: What is the return type of the following method? public static void…
A: Question 10: Given void widget, so the return type is void. The answer is Option B.
Q: Create a class called Employee that includes three pieces of information as instance variables—a…
A: Program code: Filename: "Employee.java" public class Employee{ private String firstName; private…
Q: Please don;t change anything. put your code line 5. Java Write a static method named toCelsius that…
A: Below is the static method of converting fahrenheit to celsius in java.
Q: To encourage good grades, Hermosa High School has decided to award each student a bookstore credit…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: a- Write a method that calculates and returns the distance between two points. The method takes four…
A: Only the first question will be answered. Java program: import java.util.Scanner; public class Main…
Q: Given the following code, what is the number of line of the method that is automatically called when…
A: The answer is: The program whould not compile.
Q: Thanks in advance. Modify a class named Circle with fields named radius, diameter, and area.…
A: After modifying: Code: public class Circle { private double radius; private double area; private…
Q: Create a class named Circle with fields named radius, diameter, and area. Include a constructor that…
A: The name of the class is the Circle. This class has three fields. The name of the fields is radius,…
Q: Program #5: a. Create a class named Circle with fields named radius, diameter, and area. Include a…
A: Actually, the code has given below:
Q: Write a program that asks the user to enter a distance in meters. The program will then pre-sent the…
A: import java.util.*;import java.lang.*;public class Main { static double showKilometers(double…
Q: ppose myCar is the name of a class variable that references an object, and go is the name of a…
A: Given :: Suppose myCar is the name of a class variable that references an object, and go is the name…
Q: To encourage good grades, Hermosa High School has decided to award each student a bookstore credit…
A: Note: Programming language is missing in the question. So we will answer this program in Java…
A(n) __________ is a special variable that receives an argument when a method is called.
a. reference variable
b. argument variable
c. parameter variable
d. method variable
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Methods with an empty parameter list and do not return a value: [Questions 1-8 required] You invoke a method by its name followed by a pair of brackets and the usual semi-colon Write a method called DisplayPersonalInfo(). This method will display your name, school, program and your favorite course. Call the DisplayPersonalInfo() method from your program Main() method Write a method called CalculateTuition(). This method will prompt the user for the number of courses that she is currently taking and then calculate and display the tuition cost. (cost = number of course * 569.99). Call the CalculateTuition() method two times from the same Main() method as in question 1. Write a method call CalculateAreaOfCircle(). This method will prompt the user for the radius of a circle and then calculate and display the area.[A = πr2].Call the CalculateAreaOfCircle() method twice from the same Main() method as in question 1. Use Math.Pi for the value of π Write a method call…c# uppose there is a method called Current Deposit is your project class. The method header is as below: public static decimal Current Deposit( in years , decimal future, double rate) This method will return the current amount of money in an account if you pass the future amount, the annual interest rate, and years number. Write one statement to declare a decimal variable myMoney, call the method with the future amount $50,000.00, interest rate 8%, and 15 years, and assign the returned value to myMoney.Question 2 has bigger options otherwise according to your policy they are 3 questions at a time. 1.) The signature of a method consists of ____________. a. method name b. parameter list c. return type d. None of the above 2.) You should fill in the blank in the following code with ______________. public class Test { public static void main(String[] args) { System.out.print("The grade is "); printGrade(78.5); System.out.print("The grade is "); printGrade(59.5); } public static void __________ (double score) { if (score >= 90.0) { System.out.println('A'); } else if (score >= 80.0) { System.out.println('B'); } else if (score >= 70.0) { System.out.println('C'); } else if (score >= 60.0) { System.out.println('D'); } else { System.out.println('F'); } } } a. int b. printGrade c. printMe d. double e. void 3.) Assume double[][] x = new double[10][5], what are x.length and x[2].length? a. 4 and 4 b. 10 and 5 c. 5 and 10 d. 5 and 5
- QUESTION 2 A prime number is a number that is evenly divisible only by itself and 1. For example, the number 5 is prime because it can be evenly divided only by 1 and 5. The number 6, however, is not prime because it can be divided evenly by 1, 2, 3, and 6. Write a method named isPrime, which takes an integer as an argument and returns true if the argument is a prime number, or false otherwise. Demonstrate the method in a complete program. Tip: Recall that the % operator divides one number by another, and returns the remainder of the division. In an expression such as num1 % num2, the % operator will return 0 if num1 is evenly divisible by num2. QUESTION 3 Use the isPrime method that you wrote in previous question in a program that stores a list of all the prime numbers from 1 through 100 in a file. plz answer these question using javaQUESTION 2 A prime number is a number that is evenly divisible only by itself and 1. For example, the number 5 is prime because it can be evenly divided only by 1 and 5. The number 6, however, is not prime because it can be divided evenly by 1, 2, 3, and 6. Write a method named isPrime, which takes an integer as an argument and returns true if the argument is a prime number, or false otherwise. Demonstrate the method in a complete program. Tip: Recall that the % operator divides one number by another, and returns the remainder of the division. In an expression such as num1 % num2, the % operator will return 0 if num1 is evenly divisible by num2. QUESTION 3 Use the isPrime method that you wrote in previous question in a program that stores a list of all the prime numbers from 1 through 100 in a file.You invoke a method by its name followed by a pair of brackets and the usual semi-colon, PLEASE USE ONLY C# PROGRAMMING. Write a method called DisplayPersonalInfo(). This method will display your name, school, program and your favorite course. Call the DisplayPersonalInfo() method from your program Main() method Write a method called CalculateTuition(). This method will prompt the user for the number of courses that she is currently taking and then calculate and display the tuition cost. (cost = number of course * 569.99). Call the CalculateTuition() method two times from the same Main() method as in question 1. Write a method call CalculateAreaOfCircle(). This method will prompt the user for the radius of a circle and then calculate and display the area.[A = πr2].Call the CalculateAreaOfCircle() method twice from the same Main() method as in question 1. Use Math.Pi for the value of π Write a method call CalculateAreaOfTriangle(), that prompts the user for the base and height…
- Please provide Java source code for following project with proper comments. Write a program that asks the user to enter a distance in meters. The program will then pre-sent the following menu of selections: Convert to kilometers Convert to inches Convert to feet Quit the program The program will convert the distance to kilometers, inches, or feet, depending on the user’s selection. Here are the specific requirements: Write a void method named showKilometers, which accepts the number of meters as an argument. The method should display the argument converted to kilometers. Convert the meters to kilometers using the following formula: kilometers = meters * 0.001 Write a void method named showInches, which accepts the number of meters as an argument. The method should display the argument converted to inches. Convert the meters to inches using the following formula: inches = meters * 39.37 Write a void method named showFeet, which accepts the number of meters as an argument.…If a method does not have a return statement, then Group of answer choices it will produce a syntax error when compiled it must be a void method it can not be called from outside the class that defined the method it must be defined to be a public method it must be an int, double, float or String methodWhen you want a method to be able to change the value of a variable that is passed to it as an argument, the variable must be __________. a. passed by reference b. a local variable c. passed by value d. a named constant
- Herbert’s Home Repair estimates each job cost as the cost of materials plus $35 per hour while on the job, plus $12 per hour for travel time to the job site. The main() method prompts the user for the name of a job (for example, Smith bathroom remodel), the cost of materials, the number of hours of work required, and the number of hours travel time. Pass the numeric data to a method that computes an estimate for the job and returns the computed value to the main() method which displays the job name and estimated price. An example of the program is shown below: Enter job descriptpon >> Room 210 Kitchen Enter cost of materials >> 5,000 Enter hours on the job work >> 120 Enter hours traveling >> 0 The price for Room 210 Kitchen is $9200. import java.util.Scanner; class JobPricing { public static void main(String[] args) { String description; double materials; double hoursOnJob; double hoursTraveling; double price;…Herbert’s Home Repair estimates each job cost as the cost of materials plus $35 per hour while on the job, plus $12 per hour for travel time to the job site. The main() method prompts the user for the name of a job (for example, Smith bathroom remodel), the cost of materials, the number of hours of work required, and the number of hours travel time. Pass the numeric data to a method that computes an estimate for the job and returns the computed value to the main() method which displays the job name and estimated price. import java.util.Scanner; class JobPricing { public static void main(String[] args) { String description; double materials; double hoursOnJob; double hoursTraveling; double price; Scanner input = new Scanner(System.in); System.out.print("Enter job description >> "); description = input.nextLine(); System.out.print("Enter cost of materials >> "); materials =…Herbert’s Home Repair estimates each job cost as the cost of materials plus $35 per hour while on the job, plus $12 per hour for travel time to the job site. The main() method prompts the user for the name of a job (for example, Smith bathroom remodel), the cost of materials, the number of hours of work required, and the number of hours travel time. Pass the numeric data to a method that computes an estimate for the job and returns the computed value to the main() method which displays the job name and estimated price. here is my code: it is showing 2 errors (in the snapshot shown below) please help import java.util.Scanner; class JobPricing { public static void main(String[] args) { String description; double materials; double hoursOnJob; double hoursTraveling; double price; Scanner input = new Scanner(System.in); System.out.print("Enter job description >> "); description = input.nextLine();…