1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
shutvik [7]
2 years ago
14

Write a method called classAttendence() that creates a 10-by-10 two-dimensional array and asks for user input to populate it wit

h strings of student names. The method should not return any values.
Computers and Technology
1 answer:
gladu [14]2 years ago
6 0

Answer:

The method written in Java is as follows:

public static void classAttendance(){

   Scanner input = new Scanner(System.in);

   String[][] names = new String[10][10];

   for(int i =0;i<10;i++){

    for(int j =0;j<10;j++){

       System.out.print("Student Name: "+(i+1)+" , "+(j+1)+": ");

       names[i][j] = input.nextLine();        

    }  

   }

}

Explanation:

This defines the classAttendance() method

public static void classAttendance(){

   Scanner input = new Scanner(System.in);

This declares the 2D array of 10 by 10 dimension as string

   String[][] names = new String[10][10];

This iterates through the rows of the array

   for(int i =0;i<10;i++){

This iterates through the columns of the array

    for(int j =0;j<10;j++){

This prompts user for student name

       System.out.print("Student Name: "+(i+1)+" , "+(j+1)+": ");

This gets the student name from the user

       names[i][j] = input.nextLine();        

    }  

   }

The method ends here

}

<em>See attachment for complete program that include main method</em>

Download txt
You might be interested in
Write a program that reads 20 integers from the user into an array and uses a function arrayMinimum that accepts an integer arra
neonofarm [45]

Answer:

#include <iostream>

using namespace std;

int arrayMinimum(int myArray[], int myArraySize) {

int small = myArray[0];

for (int i = 0; i < myArraySize; i++) {

   if(myArray[i]<small){

small = myArray[i];

}

 }

 return small;

}

int main(){

   int myArray[20];

   for(int i =0;i<20;i++){

       cin>>myArray[i];          

   }

   cout<<"The smallest is: "<<arrayMinimum (myArray,20);

   return 0;

}

Explanation:

This solution is provided in c++

#include <iostream>

using namespace std;

This line defines the arrayMinimum function

int arrayMinimum(int myArray[], int myArraySize) {

This initializes the smallest of the array element to the first

int small = myArray[0];

This iterates through the array

for (int i = 0; i < myArraySize; i++) {

This if condition checks for the smallest

   if(myArray[i]<small){

The smallest is assigned to the small variable

small = myArray[i];

}

 }

This returns the smallest

 return small;

}

The main method begins here

int main(){

This declares an array of 20 elements

   int myArray[20];

The following iteration allows user input into the array

<em>    for(int i =0;i<20;i++){ </em>

<em>        cin>>myArray[i];          </em>

<em>    } </em>

This calls the method and returns the minimum

   cout<<"The smallest is: "<<arrayMinimum (myArray,20);

   return 0;

}

6 0
2 years ago
Clive wants to write a query that will display the names of the students who scored less than 10 in their final exams. Which num
Mice21 [21]
I'd go for <span>FLOOR(x)
</span>

The numerical function FLOOR(x) can be used to return the largest integer value that is less than or equal to the numerical expression provided. The numerical function CEILING (x) is the opposite of FLOOR(x) since it gives the smallest integer value that is greater or equal to the numerical expression.






6 0
2 years ago
Read 2 more answers
Your wearable device synchronized with your smartphone this morning when you turned it on, but the two devices no longer are syn
Lady_Fox [76]
<span>There are several reasons why two devices are not synchronized: maybe there are not the same versions of the programs on both devices, maybe the software needs restart in order to have the latest input data, maybe the internet connection was lost during synchronization

Next steps would be:
- restart the devices
- Update to the latest version
- connect to the internet
- make the synchronization again
</span>
7 0
2 years ago
After a conditional formatting rule is created using the ____ dialog box, the rule is then available for use in the database fro
Setler [38]

Answer:

New Formatting Rule.

Explanation:

Using New Formatting Rule the rule can be used in the database .Conditional formatting is used to highlight cells with different color according to the value of the cell. Conditional formatting can be done using formulas.In conditional formatting you can use if statements ,if else staements ,formulas etc.

5 0
3 years ago
Which of the following is not one of the four methods for classifying the various instances of malware by using the primary trai
BlackZzzverrR [31]

Answer: Source

Explanation: The malware is the software persisting malicious approach to cause the damage/loss.The primary trait of the malware are infection,concealment,etc.

The concealment refer to the malware such as the Trojan horse, and other viruses that has only purpose to cause the malfunctioning in the system.The virus that get into the other software and then damage the system in known as the infectious malware .

The circulation is the transferring of the virus in the circular manner between the system for the damaging.Thus,the only trait that is not the part of the malware is source.

4 0
3 years ago
Other questions:
  • Define the missing function. licenseNum is created as: (100000 * customID) + licenseYear. Sample output:
    10·2 answers
  • c++ design a class named myinteger which models integers. interesting properties of the value can be determined. include these m
    14·1 answer
  • NEED HELP FAST
    13·2 answers
  • Which method allows a computer to react accordingly when it requests data from a server and the server takes too long to respond
    5·1 answer
  • The mods have peanuts for brains (it's true, I lost like 1k points to them for no reason)
    12·1 answer
  • Adobe reader is a type of​
    14·2 answers
  • I am bad with excell pleasee heelp
    15·1 answer
  • List at least 5 professions for people working in the Information/Communication<br> fields.
    10·1 answer
  • Tạo biến
    8·1 answer
  • What distinguishes Accenture as a holistic provider of Extended Reality (XR) services?.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!