Question 7 Consider the class definition shown below. Notice that some lines have been replaced by descriptions (in angle brackets) of the code required. The class defines methods newWord, convertWord...


correct answer please


Question 7<br>Consider the class definition shown below. Notice that some lines have been replaced by descriptions (in angle brackets) of the code required. The class defines methods<br>newWord, convertWord and toString. Fill in the appropriate Java and then select the correct options in the following text.<br>(A) How many variables in total are referenced by newWord? (B) How many data types are used in convertWord? (C) How many variables are referenced by convertWord?<br>Select the option that correctly answers questions A, B and C. ISelect)<br>[ Select]<br>12<br>Select<br>Calling newWord with 2 as parameter would return ISelect ]<br>(A) 6 (B) 4 (C) 4<br>(A) 6 (B) 3 (C) 5<br>(A) 4 (B) 4 (C) 5<br>(A) 4 (B) 4 (C) 4<br>(A) 6 (B) 3 (C) 4<br>(A) 6 (B) 4 (C) 5<br>(A) 4 (B) 3 (C) 5<br>(A) 4 (B) 3 (C) 4<br>Calling convertWord with
emd dme dem [ Select) ( Select] afcdebfcde t afedebfcde afcdebccde abfcdebfcde pblie String nevord(int no, int ni) ( StEing terult *" for (int i - 0; i < x.1ength():="" 1+*="" result="" k.chaeát="" ((1460)="" %="" x.length());="" tor="" (int="" )-="">< t-length():="" 3++)="" {="" eeult="" y.chaeāt{{3+nl)="" y.length(});="" }="" select="" tetuen="" teults="" 1="" [="" select="" )="" [select]="" plie="" steing="" conrertlord(steing="" word)="" int="" a.="" vord.length()1="" steing="" teult-"="" chart)="" but="" new="" char(n]i="" tor="" (int="" 1="" -="" 0:="" 1c="" n="" i)="" e="" but(n-1-1]-="" vord.charat="" (1)}="" tor="" (int="" i="" -="" 0:="" 1c="" but.length/2:="" 1++)="" {="" toina="" noita="" niota="" eerult="" bue[1];="" )="" noati="" zetuen="" reult:="" "/="">
Extracted text: Question 7 Consider the class definition shown below. Notice that some lines have been replaced by descriptions (in angle brackets) of the code required. The class defines methods newWord, convertWord and toString. Fill in the appropriate Java and then select the correct options in the following text. (A) How many variables in total are referenced by newWord? (B) How many data types are used in convertWord? (C) How many variables are referenced by convertWord? Select the option that correctly answers questions A, B and C. ISelect) [ Select] 12 Select Calling newWord with 2 as parameter would return ISelect ] (A) 6 (B) 4 (C) 4 (A) 6 (B) 3 (C) 5 (A) 4 (B) 4 (C) 5 (A) 4 (B) 4 (C) 4 (A) 6 (B) 3 (C) 4 (A) 6 (B) 4 (C) 5 (A) 4 (B) 3 (C) 5 (A) 4 (B) 3 (C) 4 Calling convertWord with "examination" as parameter would return (Select] 13 Given an instance of this class, System.out.printin would print (Select] [ Select] [Select edm dleader to a detinition of a clasa called "Woede deciacation of String tielda called nd "yr, vith initialitation to "ab" and "edef" Eepectively.> emd dme dem [ Select) ( Select] afcdebfcde t afedebfcde afcdebccde abfcdebfcde pblie String nevord(int no, int ni) ( StEing terult *" for (int i - 0; i < x.1ength():="" 1+*="" result="" k.chaeát="" ((1460)="" %="" x.length());="" tor="" (int="" )-="">< t-length():="" 3++)="" {="" eeult="" y.chaeāt{{3+nl)="" y.length(});="" }="" select="" tetuen="" teults="" 1="" [="" select="" )="" [select]="" plie="" steing="" conrertlord(steing="" word)="" int="" a.="" vord.length()1="" steing="" teult-"="" chart)="" but="" new="" char(n]i="" tor="" (int="" 1="" -="" 0:="" 1c="" n="" i)="" e="" but(n-1-1]-="" vord.charat="" (1)}="" tor="" (int="" i="" -="" 0:="" 1c="" but.length/2:="" 1++)="" {="" toina="" noita="" niota="" eerult="" bue[1];="" )="" noati="" zetuen="">
<Header for a definition of a class called
public String newWord(int no, int nl) { String result = ""; for (int i result + x.charAt( (i+n0) x.length()); for (int j = 0; j < y.length();="" j++)="" {="" result="" +="y.charAt" (="" (j+nl)="" %="" y.length="" (0);="" }="" 0;="" i="">< x.length();="" i++)="" {="" %3d="" return="" result;="" public="" string="" convertword(string="" word)="" (="" int="" n="word." length():="" string="" result="" *";="" char[]="" buf="new" char[n];="" 0;="" i="">< n;="" i++)="" {="word.charAt(i);" }="" 0;="" i="">< buf.length/2;="" i++)="" {="" for="" (int="" i="" %3d="" buf[n-i-1]="" for="" (int="" i="" result="" +="buf[i];" }="" return="" result;="" }=""> "/>
Extracted text:

public String newWord(int no, int nl) { String result = ""; for (int i result + x.charAt( (i+n0) x.length()); for (int j = 0; j < y.length();="" j++)="" {="" result="" +="y.charAt" (="" (j+nl)="" %="" y.length="" (0);="" }="" 0;="" i="">< x.length();="" i++)="" {="" %3d="" return="" result;="" public="" string="" convertword(string="" word)="" (="" int="" n="word." length():="" string="" result="" *";="" char[]="" buf="new" char[n];="" 0;="" i="">< n;="" i++)="" {="word.charAt(i);" }="" 0;="" i="">< buf.length/2;="" i++)="" {="" for="" (int="" i="" %3d="" buf[n-i-1]="" for="" (int="" i="" result="" +="buf[i];" }="" return="" result;="" }="">
Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here