import java.util.Scanner; public class Gradebook { // main method public static void main(String [] args) { Scanner
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Search with a student name to know the student total grade Make the search method first. . Input / parameter: the user provided name (String), the array for names (String []) Process: Use a FOR loop, to read each element in the name array and compare with the user provided name: if (name[i].equals (userInputName)) //or using equalsIgnoreCase() Output: When the above if condition is true, return the i value for the element index. If after you go through the entire name array and cannot find a matching name, after the loop block, return -1 (an invalid / meaningless value for the index number) Search with a student name to know the student total grade Make the search method first. . Input / parameter: the user provided name (String), the array for names (String []) Process: Use a FOR loop, to read each element in the name array and compare with the user provided name: if (name[i].equals (userInputName)) //or using equalsIgnoreCase() Output: When the above if condition is true, return the i value for the element index. If after you go through the entire name array and cannot find a matching name, after the loop block, return -1 (an invalid / meaningless value for the index number)
Expert Answer:
Answer rating: 100% (QA)
java import javautilScanner public class GradeBookHW public static void mainString args Scanner input new ScannerSystemin Create 2 String arrays for s... View the full answer
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these programming questions
-
fix this code so i dont get errors: package final_project; import java.util.ArrayList; import java.util.Scanner; import java.util.regex.Pattern; /** * * @author hudael-haj_snhu */ class Ingredient {...
-
answer the question clearly You are building a flight-control system for which a convincing safety case must be made. Would you assign the tasks of safety requirements engineering, test case...
-
(a) Explain how a limit worth may be tended to at run-time, both in a syntaxtree middle person and in collected code. What is the importance word "settled" already? [3 marks] (b) Give a model program...
-
Evaluate the limit or state that it does not exist. lim (x,y) (1,-3) In(3x + y)
-
An expert reviews a sample of 10 scientific articles (n = 10) and records the following number of errors in each article: 0, 4, 2, 8, 2, 3, 1, 0, 5, and 7. Compute SS, variance, and standard...
-
Let W = f(t) represent wheat production in Argentina, in millions of metric tons, where t is years since 2010. Interpret the statement f(5) = 49.2 in terms of wheat production.
-
North Shore Architectural Stone, Inc., a company that installs limestone in residential and commercial buildings, agreed to supply and install limestone for a property owned by Joseph Vitacco. North...
-
U3 Company is considering three long-term capital investment proposals. Each investment has a useful life of 5 years. Relevant data on each project are as follows. Depreciation is computed by the...
-
1. A ray of light enters glass (index 1.570) from air at an incident angle of 25. Find the angles of refraction and of deviation. 2. A light ray is directed through air (index 1.000) at a 25 angle of...
-
Two trains A and B are travelling in the same direction, with train A behind train B. Train A, 65 meters long is travelling at 240 kph. Train B, 85 meters long, is travelling at 120 kph. 47. At when...
-
Now review the audit report of the 2022 financial report. State what type of opinion was expressed? Are there any additional sections or paragraphs indicating any audit issues? What key audit matters...
-
What action should be taken during the bank reconciliation process to account for the cost of printed cheques?
-
Rose is getting older and she realized that she will never outspend her assets. She wants to start gifting her grandchildren a substantial amount every year however she does not want to pay any taxes...
-
Kevin knows that rental property in the area averages a Gross Income Multiplier (GIM) of 7.5. If the property is producing annual rental income of $55,000 plus additional income of $20,000, how much...
-
Brandon opens a joint checking account with his brother Shane. Brandon deposits $30,000 into the account and Shane deposits nothing. Three months later, Shane withdraws $15,000. What type of gift is...
-
Axel Corporation acquires 100% of the stock of Wheal Company on December 31, Year 4. The following information pertains to Wheal Company on the date of acquisition: Book Value Fair Value Cash $...
-
Find the velocity, acceleration, and speed of a particle with the given position function. r(t) = (t 2 , sin t - t cos t, cos t + t sin t), t > 0
-
Write a program that meets the following requirements: Creates an array with 100 randomly chosen integers. Prompts the user to enter the index of the array, then displays the corresponding element...
-
Write a program that draws line segments using the arrow keys. The line starts from the center of the pane and draws toward east, north, west, or south when the right-arrow key, up-arrow key,...
-
Create a new concrete class that implements MyMap using open addressing with linear probing. For simplicity, use f(key) = key % size as the hash function, where size is the hash-table size....
-
Identify the most promising areas of research for future researchers in the area of hedge fund systemic risk.
-
Discuss how hedge funds and the potential for shadow banking may contribute to systemic risk and the prospect for contagion.
-
Explain the relation between hedge fund characteristics and risks.
Study smarter with the SolutionInn App