Write a recursive method that takes four inputs: a 1-D array of Strings (i.e., exams), the length of this 1-D array (i.e., n), an index to access array elements (i.e., i) and a 2-D array containing double values (i.e., ret).

Answers

Answer 1

Answer:

import java.util.*;

public class Main

{

       public static void main(String[] args)  

       {

           String [] exams = {"1;2;3;4;" , "5;6;7;8;" , "9;10;11;12;" };

           double[][] n = new double[exams.length][4];

           examArray = convert(exams , exams.length , 0 , n);

           for(int i = 0 ; i < exams.length ; i++)

           {

               for(int j = 0 ; j < 4 ; j++)

               {

                   System.out.print(n[i][j] + "\t");

               }

              System.out.print("\n");

           }

       }    

       

/* recursive function convert defined here */

       public static double[][] convert(String[] exams , int number , int x , double [][] result)

       {

           if(x==number)

               return result;

           else

           {

               String total = exams[x];  

               String currentScore = "";

               int p = 0;

               for(int j = 0 ; j<totalScore.length() ; j++)

               {

                   char ch = total.charAt(j);/

                   if(ch==';')

                   {

                       result[x][p] = Double.parseDouble(currentScore);

                       p++;

                       currentScore = "";

                   }

                   else

                   {

                       currentScore = currentScore + Character.toString(ch);

                   }

               }

               return convert(exams , number , x+1 , result);

           }

           

       }

}

Explanation:

The Java source code defines a recursive function or method called convert that converts the results of three students that sat for four examinations to double or float number and screens their individual results for the four exams on the screen.


Related Questions

HELP PLEASE
Which type of error occurred in the following lines of code?

>>> print(9 / 0)
Traceback (most recent call last):
File " ", line 1, in
9/0
ZeroDivisionError: division by zero

logical error
logical error

exception
exception

syntax error
syntax error

reserved word error
reserved word error

Answers

Answer:

Logical Error

Explanation:

The division by 0 is a logical error.

You want to see data on charters flown by either Robert Williams (employee number 105) or Elizabeth Travis (employee number 109) as pilot or copilot, but not charters flown by both of them. Create the table that would result from applying the SELECT and PROJECT relational operators to the CHARTER table to return only the CHAR_TRIP, CHAR_PILOT, and CHAR_COPILOT attributes for charters flown by either employee 105 or employee 109.

Answers

Answer:

So, what is the question?!

Explanation:

write a complete main that will input a decimal number, double it and display the results

Answers

Answer:

No sure what language you want but since I am best with Java.

class Main {

 public static void main(String[] args) {

   Scanner input = new Scanner(System.in);  // Create a Scanner object

   System.out.println("Enter Number");

double number01 = input.nextLine();  // Read user input

double multi = number01 * 2;

   System.out.println("Number is " + multi);  // Output user input

}

}

Explanation:

Computer applications can help us to stay organized, but they can also add a lot of complexity! What are some ways you use applications to help streamline your life? What else would you like to use to further improve your organization?

Answers

The ways that a person can use applications to help streamline your life are:

It helps a person to delegate one task.It helps to De-clutter a person's workspace.It helps to make a system for a regular task. It helps to break as well as cut down one's communicationIt helps to plan out your week.

What else would you like to use to further improve your organization?Application's that can give constructive feedback. ...Applications that helps to Organize and optimize tasks. .

What is the meaning of computer application?

Computer Application is known to be a term that connote a kind of an identifiable computer software process that is often used to make as well as gets back  communications or transactions on a person's behalf or on behalf of an organization which it stands for.

Therefore, The ways that a person can use applications to help streamline your life are:

It helps a person to delegate one task.It helps to De-clutter a person's workspace.It helps to make a system for a regular task. It helps to break as well as cut down one's communicationIt helps to plan out your week.

Learn more about Computer applications from

https://brainly.com/question/24264599

#SPJ1

________________ is one example of a career that is available within the web and digital communications path.

Question 13 options:

Multimedia artists and animators


Engineer


Police Officer


Programmer

Answers

Answer:

multimedia artists and animators

Which of the following makes the varied types of digital communication possible?


an agreed-upon set of rules and standards governing the way technology shares and manages data


properly linking all of the workstations on a closed loop-like configuration


refraining from relying too heavily on one central hub that connects all nodes on a system


only using a high-quality server computer with lots of memory

Answers

Answer:

An agreed-upon set of rules and standards governing the way technology shares and manages data

Write code to print values of integers x, y, and z in a single line such that each value is left-justified in 6 columns

Answers

The code to print given value can be x = int(input ("enter first number: ")) y = int(input ("enter second number: ")) z = int(input ("enter third number: ")) print('%6d %6d %6d' %(x,y,z)).

What is a code?

Print is a function in many programming languages that sends text, variables, or another object to the screen. If you're more familiar with the Scratch programming language, print is equivalent to say.

The print command is used to print a file without using a printing-capable Windows application.

We receive three integer variables (x,y,z) using the Python programming language, and the values are printed out using string formatting (%6), which specifies that the output should be right justified with a width of 6.

x = int(input ("enter first number: "))

y = int(input ("enter second number: "))

z = int(input ("enter third number: "))

print('%6d%6d%6d'%(x,y,z)).

Thus, this is the code to print given value.

For more details regarding a code, visit:

https://brainly.com/question/1603398

#SPJ1

Taking on a programming internship does not provide training and is of little value to an intern. True or False.

Answers

Answer:

the correct answer is False

Carlos is having trouble with his device. It keeps freezing on him and he does not know what to do. What is the first step he should take when troubleshooting this problem?

A.
sell the computer

B.
check for power issues

C.
restart his device

D.
verify network connectivity

Answers

c restart his device

Explanation:

it is freezing and the most logical reason is c restart his device

Rank the following storage systems from slowest to fastest:
a. Hard-disk drives
b. Registers
c. Optical disk
d. Main memory
e. Nonvolatile memory
f. Magnetic tapes
g. Cache

Answers

Answer:

Slower = Larger capacity (and vice versa)

Ranked from Slowest to Fastest:

1. magnetic tapes

2. optical disk

3. hard-disk drives

4. nonvolatile memory

5. main memory

6. cache

7. registers

A computer is experiencing network connectivity issues; what step would you NOT attempt to solve the problem?

Answers

Answer:

A step I wouldn't take is throwing the computer in the trash and lighting my house on fire.

Explanation:

SOMEONE PLEASEE *URGENT**

Sequencing and Flowcharting
Try writing out the sequence of events for one of the simple instructive processes below:

1. Drawing a square on a piece of 8 x 11 paper.
2. Moving from your 2nd-period class to your 3rd-period class.
3. Adding a new contact to your list of cell phone contacts.

Now, create a flowchart that outlines how to complete your chosen sequence of events. You may wish to reference these common flowchart symbols as you work.

Submit
1) In the text box: Your sequence of events written out.

2) A file image of your flowchart outlining that sequence of events.

Answers

hope this helps!!!!!

Imani needs to copy text from one document into another document. She needs the pasted text to retain its original appearance. When she pastes the text, she should use which of the following settings?

Keep Text Only

Use Destination Theme

Merge Formatting

Keep Source Formatting

Answers

Answer:

Keep Text Only

Explanation:

Because why would it be any of the other ones so it would be that

Imani must transfer text from one paper to another. She ought to preserve the formatting from the original content when she pastes it. Hence, option D is correct.

What is a Document?

A file produced by a software program is a computer document. Originally used to describe only word processing documents, the term "document" is now used to describe all saved files. Text, photos, music, video, and other sorts of data can all be found in documents.

An icon and a filename are used to identify documents. The filename gives the file a specific name, whereas the icon depicts the file type visually. The majority of filenames for documents also contain a file extension, which indicates the file type of the document. For instance, a Photoshop document might have a.PSD file extension, whereas a Microsoft Word document would have a.DOCX file extension.

To get more information about Document :

https://brainly.com/question/2901657

#SPJ6

why information systems were centralized and used solely with governance and management
during the First Era

Answers

The data will be given according to the supply and the processor was strong with governance and management

What is information systems?

Storage of data sets, interaction logs, documents, and modification histories can be done with the help of computer systems. The organization will spend a considerable amount of time hunting for certain data if the conventional remote backup is used.

Strategic planning is a governance strategy used by governments. The act of submitting, succumbing, or providing details is known as data compliance was used in the First Era.

Learn more about information systems, here:

https://brainly.com/question/13299592

#SPJ1

Advantages and Disadvantages of Modern Devices​

Answers

Answer:

Advantages of Technology:

Easy access to information

Improved Communication

The convenience of travelling

Convenience in Education

Improved entertainment

Disadvantages of technology

Excessive dependency

Inevitable Cheating

Laziness and forgetting the basic way of studying

Bad Directions You are driving to your friend’s house and are using your smartphone for directions. While approaching your destination, you realize that your smartphone app instructed you to turn the wrong way on your friend’s street. How could this have happened?

Answers

This could have happened when:

Lack of Internet service or failureWrong application.What do you mean by Internet?

The Internet is seen as a form of a network that helps people to  connects their computers all over the nation.

In this age,  Through the help of the Internet, people are able to  share information and navigate through places.

Note that the problem of bad direction could have happened when:

Lack of Internet service or failureWrong application.

Learn more about Internet from

https://brainly.com/question/2780939

#SPJ1

What does the office background allow you to do?

Answers

Answer: Any changes that you make to the Office Background in PowerPoint 365 will be reflected in all other Microsoft Office 365 products on your computer, such as Word, Excel, Outlook, and others. These patterned strips are not activated by default.

The Internet is the largest example of a _____?

Answers

Answer:

the answer is wide area network


Imagine that you are designing a smishing scam that involves sending text to people to entice them to go to a website and provide personal information that
you can use to access their checking account.
Open a new Microsoft® Word document and craft a text message that would be difficult for people to ignore.
Design a simple web page that would look legitimate to people who bank at your bank and that would capture their checking account number and PIN.

Answers

Answer:

Explanation:

i attached picture down check it below

I want to know if C# can be used to solve questions here as well.

Answers

What exactly is the question that you’re asking what is C #?

Which of the following is NOT an e-reader you would use as an alternative to carrying around a set of textbooks?

Answers

Answer:

Which of the following is NOT a benefit of a word processing application?

Explanation:

Your team has been assigned responsibility to identify an appropriate MSSP provider for a small, rural hospital. What criteria will you use to select an appropriate provider? Do research online to identify three MSSP providers. Use the criteria you established to rate each of the three, and choose the one that would be best for the hospital.

Answers

The Criteria for Choosing the Right MSSP for for a small, rural hospital are:

Customized solution. UX – User experience. Responsiveness. Cost-effective.

What are the three MSSP providers?

They are:

1) Cipher.

2) SecurityHQ.

3) SecureWorks.

The option that is chosen among the three is Cipher. It is known to be chosen because they provide the services listed above which is needed by the hospital as well as:

Cybersecurity MonitoringIncident Management and Cyber Defense Security Asset Management, etc.

Therefore, based on the above. The Criteria for Choosing the Right MSSP for for a small, rural hospital are:

Customized solution. UX – User experience. Responsiveness. Cost-effective.

Learn more about Cipher from

https://brainly.com/question/14754515
#SPJ1

1. What is the difference between tools and equipment?

2. Describe the word paraphernalia.​

Answers

Answer:

down below

Explanation:

1- tools can be any item used to achieve a goal. an equipment is a specific tool used to achieve a specific object

2- it means article of equipment. equipment used for a particular activity.

hope this helps<3

Tools are used to fix things or help fix things and equipment is like for example I need equipment for my in home gym

Do some research and find out whether Babbage’s Analytical Engine is a computer according to the von Neumann model.

Answers

Answer: The Analytical Engine incorporated an arithmetic logic unit, control flow in the form of conditional branching and loops, and integrated memory, making it the first design for a general-purpose computer that could be described in modern terms as Turing-complete.

Which of the following information
is required by application programs
to access the content ofa file.
a. File name
b. File location
c. File extension
d. File size

Answers

An information which is required by application programs to access the content of a file is: c. File extension.

What is a file?

A file can be defined as a computer resource or type of document that avails an end user the ability to save or record data as a single unit on a computer storage device.

In Computer technology, a sequence which best reflects the size of various files and their extension on a computer system, from smallest to largest include the following:

Text (.txt)Compressed files (.zip)Picture (.jpeg)Audio (.mp3)Video (.mp4)

In conclusion, we can reasonably infer and logically deduce that an information which is required by application programs to access the content of a file is file extension because an error would occur if there's an incompatibility issue between the two resource.

Read more on file extensions here: brainly.com/question/1982059

#SPJ1

The Window logo at the top left hand side of the page is known as​

Answers

Answer:

The title bar is a horizontal bar located at the top of a window in a GUI. It displays the title of the software, name of the current document or file, or other text identifying the contents of that window.

Explanation:

HOW TO WRITE IN MACHINE STENO?



1.we have a meeting in our office during the afternoon.
2.inbetween of the left and rightwe have the vowel.
3.The left side of the keyword is didecated to the beginning of the syllable.

Answers

Answer:

so first download the app if u have a mac it's easy

Explanation:

app name I guess you know so u can easily find and get it

Name this program lower.c - This program will read two strings and output which string has more lowercase letters. If both strings contain the same amount of lowercase letters, indicate the number of lowercase letters. Match the output according to the examples below. Assume each string will contain less than 50 characters.

Examples
Enter two strings:
Hello wORLD
'Hello' contains 3 more lowercase letter(s) than 'wORLD'.

Enter two strings:
HELLO WORLD
'HELLO' and 'WORLD' both contain 0 lowercase letter(s).

Enter two strings:
CRIMson! tide1
'tide1' contains 1 more lowercase letter(s) than 'CRIMson!'.

Answers

The program will be:

#include <stdio.h>

int lower_count(char s[]) {

   int count = 0, i;

   for (i = 0; s[i]; i++) {

       if (s[i] >= 'a' && s[i] <= 'z')

           ++count;

   }

   return count;

}

int main() {

   char str1[51], str2[51];

   int count1, count2;

   printf("Enter two strings:\n");

   scanf("%s", str1);

   scanf("%s", str2);

   count1 = lower_count(str1);

   count2 = lower_count(str2);

   if (count1 > count2) {

       printf("'%s' contains %d more lowercase letter(s) than '%s'.\n", str1, count1 - count2, str2);

   } else if (count1 < count2) {

       printf("'%s' contains %d more lowercase letter(s) than '%s'.\n", str2, count2 - count1, str1);

   } else {

       printf("'%s' and '%s' both contain %d lowercase letter(s).\n", str1, str2, count1);

   }

   return 0;

}

What is a program?

It should be noted that a series of instructions written in a programming language for a computer to follow is referred to as a computer program.

The software, which also contains documentation and other intangible components, comprises computer programs as one of its components. Source code is a computer program's human-readable form.

In this case, the program is shown above.

Learn more about program on:

https://brainly.com/question/26642771

#SPJ1

The student's quiz grades are stored in the Python list quizzes. To calculate the student's quiz average we need to drop the 3 lowest scores and calculate the average of the remaining quizzes. The output is to be the average of the remaining quiz grades and the quiz grades that were dropped. Make use of the string formatting in section 3.7 to create the output.

Answers

The program that will compute the average quiz grade for 5 students is given below:

The Program

# This program will compute the average quiz grade for 5 students

print("Hello, this program is designed to compute the average quiz grades for the following students: Clark, Nicole, Kiran, Alex, and Erik")

students = ["Clark", "Nicole", "Kiran", "Alex", "Erik"]

grades = []  # create an empty list to store the grades in

for student in students:

   print(student, ", What was your quiz grade?")

   grade = input("My grade is: ")

   grades.append(int(grade))  # convert the grade to an integer number, then add it to the list

print("Here are the grades you entered: ", grades)

average = sum(grades) / len(grades)

print("The average is:", average)

highest = max(grades)

print("The highest grade is:", highest)

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1

Write a program that takes in three integers and outputs the median value (not the largest or smallest value). End the output with a newline. Ex: If the input is: 7 1 4 the output is: 4
in C++ please

Answers

Hope this helps bro
Other Questions
After a 7.5% pay rise Mr Jones salary was 29455. What was his salary before the pay rise? assume congress enacted a statute making it a crime to possess a firearm on school property. assume further that the supreme court declared the statute to be unconstitutional as not within congress's power to legislate. What variable determine the amount of kinetic energy an object has To whom does Cathy claim to be related too? Is this true? (House on mango street) Which process led to the evolution of polar bears and brown bears from a common ancestor? True or false. Brainly is mostly wrong :/ Help me please I will mark the person as a brainliest. as archaeologists uncovered ruins of the indus valley civilization, what impression did they get of the people who lived there? What is the value of the expression below when x=7 Classify each of the following reactions as either exothermic or endothermic: 2H,O(l) + heat 2H(g) + O(g) (a) What overall impression does Hanging Fire create? (b) What theme is conveyed by the poem? How did his failure to use a telegraph put Lee at a disadvantage? American the story of us episode 5: civil war Why were the battles of saratoga a significant moment in the american revolutionary war? a short essay on BACK TO SCHOOL of 100 words Four times a number, subtracted from 8, is twice the number. Find the number. the nurse is explaining the recommended dietary allowances (rdas) to a client seeking nutritional counseling. how would the nurse describe rdas? which specialized unit, designed to support on-scene responders, may be established at large-scale incidents? what is it called when behavior analysts frequently speak about behavior analysis to others? this can be done through presentations, trainings, radio shows, or even just spreading the good word about behavior analysis. How did the Commercial Revolution of the early 1800s impact the geographic balance of power in Africa? i have two numbers that sum to 16 and have a difference of 3. by forming two equations and solving them, find the two numbers