Question: Question 5: (25 marks) Implement a Java program to find the ... Question 5: (25...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Question: Question 5: (25 marks) Implement a Java program to find the ... Question 5: (25 marks) Implement a Java program to find the longest programming language name in a set of programming language with the following specifications: a. Write a Java method named longestProgLangName () that takes as an argument a 2D array called ProgLang and returns the longest language name in the 2D array ProgLang. b. Write a Java class called ProgLang2DArray that does the following tasks in the main () method: o Declares a 2D array variable named lang2D with name arr2D with 4 rows and 4 columns. o Reads from the user the values to be saved in the 2D array lang2D. o Call the method longestProglangName () to find the longest language name in the array lang2D. o Find the location (row number and column number) of the longest language name in the array lang2D. o Print the longest language name in the array lang2D and it location. Sample Run: Enter a 2D array with 4 rows and 4 columns with programming languages names: Java Pascal C Ruby Ring Ada Swift Kotlin Assembly FORTRAN The longest language name is Objective-C and found in row 2 and column 3. C# Perl PHP JavaScript Objective-C BASIC Question: Question 5: (25 marks) Implement a Java program to find the ... Question 5: (25 marks) Implement a Java program to find the longest programming language name in a set of programming language with the following specifications: a. Write a Java method named longestProgLangName () that takes as an argument a 2D array called ProgLang and returns the longest language name in the 2D array ProgLang. b. Write a Java class called ProgLang2DArray that does the following tasks in the main () method: o Declares a 2D array variable named lang2D with name arr2D with 4 rows and 4 columns. o Reads from the user the values to be saved in the 2D array lang2D. o Call the method longestProglangName () to find the longest language name in the array lang2D. o Find the location (row number and column number) of the longest language name in the array lang2D. o Print the longest language name in the array lang2D and it location. Sample Run: Enter a 2D array with 4 rows and 4 columns with programming languages names: Java Pascal C Ruby Ring Ada Swift Kotlin Assembly FORTRAN The longest language name is Objective-C and found in row 2 and column 3. C# Perl PHP JavaScript Objective-C BASIC
Expert Answer:
Answer rating: 100% (QA)
ProgLang2DArrayjava import javautilScanner public class ProgLang2DArray pub... View the full answer
Related Book For
Business Data Communications Infrastructure Networking and Security
ISBN: 978-0133023893
7th edition
Authors: William Stallings, Tom Case
Posted Date:
Students also viewed these programming questions
-
Write an assembly language Program to find the sum of the first two words (number) of data in the memory data segment with the label values below, and then continue to find the sum of the first...
-
In Exercises 1-2, use a matrix program to find the eigen- 40. values of the matrix. Then use the method of Example 4 with a row reduction routine to produce a basis for each eigenspace. 1. 2. 447 113...
-
Write a function called ParseSentence that takes as an input parameter a null-terminated string S. Where S would contain an English sentence. Assume that the delimiters are space, comma, semicolon...
-
You would like to buy a house in in 16 years and estimate that you will need a deposit of $73,014. You plan to make bi-weekly deposits into an account that you hope will earn 7.05%. How much do you...
-
Inventory Accounting General City's general fund reported a supplies inventory costing $1,000,000 at the beginning of the fiscal year. During the year, General City purchased materials and supplies...
-
Indicate what the scatter diagram and probable regression line would look like for two variables that are correlated in each of the following ways. In each instance, assume a negative intercept. a....
-
It is said that "the higher the MARR, the higher the price that a company should be willing to pay for equipment that reduces annual operating expenses." Explain the reasoning behind this statement.
-
Austin, Inc., produces small-scale replicas of vintage automobiles for collectors and museums. Finished products are built on a 1/20 scale of originals. The firms income statement showed the...
-
Pore Networks in Membranes. (20 pts) Consider two membranes below, with equal void space, but differently configured. The membrane on the left consists of a narrow and a wide pore in parallel, while...
-
2. A double-spool turbofan engine is used to power an aircraft flying at speed of 250 m/s at an altitude of 11,000 m, where ambient temperature is -50C and pressure is 22.7 kPa. As shown below, the...
-
Consider the following assembly language program. Draw and Fill Symbol Table of the following code. LOOP BRZ DONE .ORIG x3000 AND R2, R2, #0 LD RO, MO LD R1, M1 RES MO M1 ADD R2, R2, RO ADD R1, R1,...
-
What are the two primary forms of corporate governance provisions that correspond to the stick and the carrot?
-
Which project would each method select? (IRR: A; MIRR: B; NPV: B)
-
What factors can lead to an increasing marginal cost of capital? How might this affect capital budgeting?
-
What are the two primary sources of equity capital?
-
Differentiate between a projects physical life and its economic life.
-
Alice, Bob and you have been studying graph algorithms. You understand the reduction between Independent Set and Clique quite well but are now considering another of Karp's 21 Problems. A vertex...
-
What will be the final value of DI after executing the following piece of code? Execute the instructions dependently one after another. CLD MOU CX,OFOH MOU AX.02874H MOU DI,01000H MOU ES, DI SUB...
-
List and briefly define key requirements for WLANs.
-
Consider a desktop publishing system used to produce documents for various organizations. a. Give an example of a type of publication for which confidentiality of the stored data is the most...
-
What types of signals are susceptible to intermodulation distortion?
-
The topological optimization is discussed in chapter 1. Here, we will consider a topological optimization problem for a chemical process plant. The layout of the chemical process plant has been shown...
-
For installation and operation of a pipeline for an incompressible fluid, the total cost (in dollars per year) can be represented as follows: \[C=C_{1} D^{1.5} L+C_{2} m \Delta p / ho\] where...
-
An adiabatic two-stage compressor is used to compress a gas, which is cooled to the inlet gas temperature between the stages, the theoretical work can be expressed by the following equation:...
Study smarter with the SolutionInn App