Given a Student class, create a class with following characteristics: The class name should be ClassRoom. Private variable students array to maintain the list of Student objects. Function addStudent with input parameter name (string) and rollNo(int) adds a new student in "students" list. Method getAllStudents should return all the students in ClassRoom.
Input Jack Jones Marry where, First & Second line represent a student's name and roll number. And so on Output 1 Jack 2 -Jones 3-Marry Assume that, Maximum "students" count can be 10.
Below is the code for the driver class - DriverMain.java
import java.util.*;
//Your program will be evaluated by this DriverMain class and several test case
public class DriverMain {
public static void main(String[] args) {
String name;
int rollNo;
int n = 0;
Student[] students = new Student[10];
ClassRoom classRoom = new ClassRoom();
Scanner input = new Scanner(System.in);
while(true){
name = input.nextLine();
if(name.equals(""))
break;
rollNo = Integer.parseInt(input.nextLine());
classRoom.addStudent(name, rollNo);
n++;
}
students = classRoom.getAllStudents();
for (int i = 0; i < n; i++) {
if(students[i]!=null)
System.out.print(students[i].getRollNo() + " - " + students[i].getName());
if (i < n - 1)
System.out.println();
}
}
}
//Below is the code for the Solution.java
// NOTE - THIS IS WHERE YOU WRITE THE CODE
import java.util.*;
class Student {
private String name;
private int rollNo;
public String getName() {}
public void setName(String name) {}
public int getRollNo() {}
public void setRollNo(int rollNo) {}
};
class ClassRoom {
private int i;
private Student[] students;
public void addStudent(String name, int rollNo) {
// WRITE YOUR CODE HERE
}
public Student[] getAllStudents() {
// WRITE YOUR CODE HERE
}
};

Answers

Answer 1

Answer:

Answered below

Explanation:

//Implementation of the addStudent method

public void addStudent(String name, int rollNo){

Student newStudent = new Student();

newStudent.name = name;

newStudent.rollNo = rollNo;

student.add(newStudent);

}

//Implementation of the getAllStudents method

public Student[] getAllStudents(){

return students;

}


Related Questions

You misplaced your company ID badge. Unfortunately, you had just changed your password and taped it to the back of the badge. It would not be difficult for someone to guess your user ID. With those two pieces of information, someone could access the files you have permission to work with, change the data stored there, delete files, or alter the access to the files. Which of the following is at risk in this scenario?

a. The confidentiality of the data
b. The integrity of the data
c. The accessibility of the data
d. None of the above

Answers

Answer:

a

Explanation:

5.In the DNS rebinding attack, if the victim’s browser caches the IP address for any hostname used in HTTP requests for an hour, can the attack still be successful? Why?

Answers

Well the awnser that you are looking for is not here and I am verry sorry about that I just need points for my awnser

Program C++ I need help!

Answers

Answer:#include <iostream>

using namespace std;

int main()

{

   int factorial = 1;

   for (int i = 5; i > 0; i--) {

       factorial = factorial * i;

   }

   cout<<factorial;

   return 0;

}

Explanation:

Use the drop-down menus to match each description to the correct type of form.
A form appears after opening a database, asking if you would like to view the fruits table, vegetables
table, or nutrition report:
Student test scores entered into a database:
A window appears before closing out of a database, asking you to save your work before exiting:
A basic form to input names, addresses, phone numbers, and e-mail addresses:
A suppliers form that contains a products form and a price form that pops up when you click on the Prices
button:
A form used as the basis of many websites because of its top-level organization system:
A form that has replaced the outdated switchboards:

Answers

Answer: switchboard, data entry, switchboard, flat, synchronized, navigation, navigation

Explanation: edgenuit work

Answer:A form appears after opening a database, asking if you would like to view the fruits table, vegetables table, or nutrition report:

✔ switchboard

Student test scores entered into a database:

✔ data-entry

A window appears before closing out of a database, asking you to save your work before exiting:

✔ switchboard

A basic form to input names, addresses, phone numbers, and e-mail addresses:

✔ flat

A suppliers form that contains a products form and a price form that pops up when you click on the Prices button:

✔ synchronized

A form used as the basis of many websites because of its top-level organization system:

✔ navigation

A form that has replaced the outdated switchboards:

✔ navigation

edge 2023

_____ can be lost or stolen by cybercriminals. Select 2 options.

Free WiFi

Computer devices

Computer networks

Antivirus software

Portable devices

Answers

Answer:

Free WiFi

Computer networks

Explanation:

They cant really take your stuff they can only take virtual objects.

Free Wifi and Computer Networks

importance of information technology in marketing​

Answers

Answer:

it helps u to convey it to more ppl by using by means of mass of communication which helps it

Customer service has improved.

Nicolai wants to add demand-based content to his Website so that customers can access the information at their behest. Which audience-development technique describes the process Nicolai wants to implement?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform this task are A to H and alt+1 to alt+9.
A

Visitor tracking
B

Push technology
C

Pull technology
D

Search Engine Optimization (SEO)

Answers

Answer:

The audience development technique that best describe the process Nicolal wants to implement is;

C Pull technology

Explanation:

Pull technology is a form of network mode of communication in which the initial data request comes from the client side of the network for it to be handled by the server side of the network.

Given that Nicola wants a demand-based content to his website for customers to access information when they wish to, the process is similar t the podcasting in which each new content is posted to a specific RSS feed from where it can be requested by a mobile app, directory or a RSS feed reader

The counter technology is a push technology where the servers push content to intended clients, such as for an incoming call, instant messaging, synchronous conferencing (online c h a t) and files.

Write the syntax.

1. for loop

2. while loop

3. function definition

4. function call

5. do while loop​

Answers

Answer:

Explanation:

The following syntax's are written in Python and perform a very basic arithmatic operation within the loop of call as an example

1.    for x in range(3):

       print(x)

2.    count = 0

      while True:

          print(count)

          count += 1

          if count == 4:

              return False

3. def next_pow2():

       return 3**2

4. next_pow2()

5. i = 1

while True:

   print(i)

   i = i + 1

   if(i > 3):

       break

#Python doesn't have an explicit do-while loop but can be emulated exactly as a do-while loop using the format written in answer 5.

How do you increase the number of tries by one?

tries.add(1)

tries = tries + 1

tries = 1

Answers

Answer:

tries = tries + 1

Explanation:

This is a universal way to increment your variable. In some languages, the following notation also works:

tries++;

tries += 1;

Again, it depends upon the language you are using. Each language has it's own syntax.

You are developing a Website that is going to be viewed extensively on smartphones and tablets. Which of the following should you implement when developing for mobile devices?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform this task are A to H and alt+1 to alt+9.
A

Increase margins and padding to make the text on the mobile device screen easier to read.
B

Avoid using heading tags to build the structure of the page and to style text.
C

Do not label form fields to avoid unnecessary verbiage.
D

Always use the alt attribute in your tags.

Answers

increase margins and padding to make the text on the mobile device screen easier to read is the answer. i will answer by typing the whole answer cause i dont want you to get mixed up

Database Management Systems are featured with:

Question 3 options:

The facility to easy editing, spelling check, auto pagination, lay out and printing reports


The ability to store large amount of data to facilitate easy update, sort and retrieval


The ability to calculate efficiently with the help of built-in functions and analyze


None of the above

Answers

Answer:

Answer: Database Management Systems are featured with:​ The ability to store a large amount of data to facilitate easy updates, short, and retrieval.

Explanation: I took the test

.
Which testing requires coding the test cases into a scripting language?
( blank) testing requires coding the test cases into a scripting language.

Answers

The blank is smart testing requires coding the test cases into a scripting language

The Automation is smart testing requires coding the test cases into a scripting language.

What is test scripting language?

A TEST SCRIPT is known to be a form of compositions of instructions that is known to be carry out on a system under test to see if the system can performs as it was expected.

Hence, the use of  for Automation testing is smart testing requires coding the test cases into a scripting language.

Learn more about scripting language from

https://brainly.com/question/26103815

If you were at the front of a long line of people, stepped onto a chair and took a
picture of the line going back in the distance, what is the best F-Stop to use if you
want only the people in the middle to be in focus?

Answers

They are closer to the people and they work than a senior management

Determine the value for the following recursive method when x = 19.

Answers

Answer:

[tex]f(19) = 2[/tex]

Explanation:

Given

[tex]f(x) = f(x - 5)+ 2[/tex] --- [tex]x > 9[/tex]

[tex]f(x) = -2[/tex] --- [tex]x \le 9[/tex]

Required

Find f(19)

f(19) implies that: x = 19

Since 19 > 9, we make use of:

[tex]f(x) = f(x - 5)+ 2[/tex]

[tex]f(19) = f(19 - 5) + 2[/tex]

[tex]f(19) = f(14) + 2[/tex] ----- (1)

Calculate f(14)

f(14) implies that: x = 14

Since 14 > 9, we make use of:

[tex]f(x) = f(x - 5)+ 2[/tex]

[tex]f(14) = f(14 - 5) + 2[/tex]

[tex]f(14) = f(9) + 2[/tex] ------ (2)

Calculate f(9)

f(9) implies that: x = 14

Since [tex]9 \le 9[/tex], we make use of:

[tex]f(x) = -2[/tex]

[tex]f(9) = -2[/tex]

So:

[tex]f(14) = f(9) + 2[/tex]

[tex]f(14) = -2 + 2[/tex]

[tex]f(14) = 0[/tex]

[tex]f(19) = f(14) + 2[/tex]

[tex]f(19) = 0 + 2[/tex]

[tex]f(19) = 2[/tex]

plz help asap

Question # 2
Multiple Select
Employees are one of the main contributors to cybersecurity breaches because of _____? Select 3 options.

software bugs

negligence

lack of knowledge

inattention

malware

Answers

Answer:

I'd say negligence, lack of knowledge and inattention

Is Conflict Healthy ?

Answers

yes

Explanation:

because it has more things

No not really I mean I don’t think so but other people might have other Pennies

nog
*
24. QUESTION 21:
Peacekeeper text is non-printing text that indicates where you can type.
(2.5 Points)
True
False

Answers

Answer: False

Explanation:

The statement that "Peacekeeper text is non-printing text that indicates where you can type" is false.

The non-printing text which shows where on exam type is referred to as the peaceholder text. It is usually an hint which can be used to fill in the actual text.

Which type of data is shown below?
apple, 0.85
banana, 0.90
peach, 1.50

Answers

Answer:

dictionary data

Explanation:

data = {"apple" : 0.85, "banana" : 0.90, "peach": 1.50}

Read the citation example, and then use the drop-down menus to identify each part.

“Astronaut Bio: Neil Armstrong (08/2012).” Johnson Space Center. N.p., n.d. Web. http://www.jsc.nasa.gov/Bios/htmlbios/armstrong-na.html

“Astronaut Bio: Neil Armstrong (08/2012)” is the
✔ title
.

Johnson Space Center is the
✔ website
.

N.p. indicates the
✔ publisher
.

Web refers to the
✔ medium
.

Answers

Answer:

Title, Website, Publisher, Medium

Explanation:

Just answered! <3

Astronaut Bio: Neil Armstrong (08/2012)” is the title, Johnson Space Center is the website, N.p. indicates the publisher, Web refers to the medium.

What is citation?

The act of referencing or acknowledging the sources of information used in a research paper, essay, or other written work is known as citation.

It entails providing specific information about the sources, such as the author's name, title, date of publication, and publisher.

Proper citation aids in the avoidance of plagiarism, which is the act of using someone else's work without crediting them.

Citations also allow readers to validate the information presented in a written work and provide a way to track down the sources of information.

The title is "Astronaut Bio: Neil Armstrong (08/2012)," the website is Johnson Space Center, N.p. stands for the publisher, and Web stands for the medium.

Thus, this can be the match for the given scenario.

For more details regarding citation, visit:

https://brainly.com/question/30066031

#SPJ3


when should you stop where you are, drop to the
cover your face with your hands, and roll over and over?
A
if you burn a stump
B
if your clothes catch fire
if you draw a cool bath
if your top layer of skin is damaged

Answers

Answer:

A . if you burn a stump because if u roll over the fire will have a 90% chance of going out

Your program analyzes complex data.
You are going to read text from a file as part of your program.
The program is saved in a folder, which has a subfolder called "numbers."
In the info folder is a text file called "sales.txt."
Which line of code will open sales.txt?
O results = open("sales.txt","r")
O results.open("sales.txt", "w")
O results = open("numbers/sales.txt","r").
O results = open("numbers/sales.txt", "w")

Answers

results = open("numbers/sales.txt","r")

Write program to read 10 random numbers, then find how many of them accept division by 4,
5, and 6.
The program should print the output like this:
There are numbers accept division by 4
There are ------ numbers accept division by 5
There are ------ numbers accept division by 6
Help me guys with this question

Answers

Answer:

In Python:

import random

di4 = 0; di5 = 0; di6 = 0

for i in range(10):

   num = random.randint(1,100)

   if num%4 == 0:

       di4+=1

   if num%5 == 0:

       di5+=1

   if num%6 == 0:

       di6+=1

print("There are "+str(di4)+" numbers accept division by 4")

print("There are "+str(di5)+" numbers accept division by 5")

print("There are "+str(di6)+" numbers accept division by 6")

Explanation:

This imports the random module

import random

This initializes the count of division by 4, 5 or 6 to 0

di4 = 0; di5 = 0; di6 = 0

This iteration is repeated 10 times

for i in range(10):

This generates a random number

   num = random.randint(1,100)

Check if number is divisible by 4. If yes, increase div4 by 1

   if num%4 == 0:

       di4+=1

Check if number is divisible by 5. If yes, increase div5 by 1

   if num%5 == 0:

       di5+=1

Check if number is divisible by 6. If yes, increase div6 by 1

   if num%6 == 0:

       di6+=1

Print reports

print("There are "+str(di4)+" numbers accept division by 4")

print("There are "+str(di5)+" numbers accept division by 5")

print("There are "+str(di6)+" numbers accept division by 6")

2. Android 1.1 was internally referred to as _________.



3. A large C program is divided into basic building blocks called as _________.



4. __________ are the in-built function in C programming system.



5. ______________ are special variables which can hold more than one value using the same

variable, using an index​

Answers

Answer:

2. petit four

3. function

4. library functions

5. array

Read the following examples, and decide whether each example describes a relational database or a flat
file. Use the drop-down menus to make your selection.
An author keeps track of income and expenses in a table:
A college admissions department stores detailed information about each applicant, including his or her
full name, address, high school, GPA, standardized test scores, intended major, and entrance exam
scores:
A social media website has many users who are allowed to upload photos, videos, and information about
themselves:
A library stores information about patron names, account numbers, books out on loan, the date books are
due, the date books are returned, the number of days a book is overdue, and overdue book fines; this
information allows the system to e-mail or call patrons to remind them to return books on time:

Answers

Answer: flat file, relational database, relational database, relational database

Explanation:

Edge

Answer:

1. flat file

2. relational detabase

3. relational detabase

4. relational detabase

Explanation:

on edg

Which of the following is a method of relationship management for an e-commerce Website?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform this task are A to H and alt+1 to alt+9.
A

Providing an automatic order tracking facility to customers
B

Requiring users to submit orders by telephone
C

Using validated HTML5 code
D

Performing Website maintenance

Answers

Answer:

if u find out can u lmk pls? j have a very similar question and I've been stuck for a min

Which of the following does Secure Sockets Layer (SSL) use to authenticate a user or system before encrypting a session?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform this task are A to H and alt+1 to alt+9.
A

A digital certificate
B

A certificate authority
C

An Electronic Funds Transfer (EFT)
D

A payment gateway

Answers

Answer:

B is more probable option than C

Explanation:

I think its both B and C

A certificate authority does Secure Sockets Layer (SSL) used to authenticate a user or system before encrypting a session. Hence, option B is correct.

What is Secure Sockets Layer (SSL)?

Secure Sockets Layer (SSL) is a security protocol used to establish an encrypted link between a web server and a web browser. It was replaced by Transport Layer Security (TLS) as the standard protocol, but the term "SSL" is still commonly used to refer to both SSL and TLS.

When a user enters a website using SSL/TLS, the website's server sends a public key to the user's browser. The browser then uses this public key to encrypt data that is sent back to the server.

This helps to prevent third parties from intercepting and reading the data being transmitted.

Thus, option B is correct.

To learn more about the Secure Sockets Layer (SSL), follow the link:

https://brainly.com/question/25401676

#SPJ2

In Excel, how many columns can be filtered at a time?

Answers

Answer:

When you apply the Filter function, after filtering one column, the next columns will be only filtered based on the result of the previous filtered column. It means that only AND criteria can be applied to more than one column.

Explanation:

Hope it helps you!

One advantage of the Second generation of programming language is that it is machine dependent. True or False

Answers

Answer:

I THINK FALSE

Explanation:

This line of code is in your program.
outFile = open("another.txt", "a")
How will outFile interact with the file it opens?

Answers

Answer:

it opens the file for appending

Answer:

write to the file, adding to the current contents of the file

Explanation:

The "a" stand for append. To append means to add onto the file.

I hope this helped!

Good luck <3

what is a client server network and its features?​

Answers

Answer:

A client-server network is the medium through which clients access resources and services from a central computer, via either a local area network (LAN) or a wide-area network (WAN), such as the Internet. ... A major advantage of the client-server network is the central management of applications and data.

Other Questions
Which theorem is the following?"If a point is on the perpendicular bisector of a segment, then it is equidistant from the endpoints of the segment" A thesis statement should have which of the following characteristics?A. It should be amusing.B. It should recap all the main points of your essay.O C. It should make a statement you could argue for or againstO D. It should summarize, point by point, the argument you will make ineach paragraph of your essay. Guys, I need help:Nolan is buying a season pass to a performing arts center.One performing art center charges $100 for the pass, plus $15.00 to park each visit.Another performing arts center charges $75 for the pass, plus $20.00 to park each visit.How many times would Nolan need to visit the two performing arts centers for the cost to be the same? which of the following solutions is the most acidic A. a solution is the most acidic B. a solution with pH of 2 C. a solution with pH of 7 D. a solution with a pH of 9 what was the effect of the Texas Revolution The Importance of Being EarnestLady Bracknell. [Sitting down again.] A moment, Mr. Worthing. A hundred and thirty thousand pounds! And in the Funds! Miss Cardew seems to me a most attractive young lady, now that I look at her. Few girls of the present day have any really solid qualities, any of the qualities that last, and improve with time. We live, I regret to say, in an age of surfaces. [To Cecily.] Come over here, dear. [Cecily goes across.] Pretty child! your dress is sadly simple, and your hair seems almost as Nature might have left it. But we can soon alter all that. A thoroughly experienced French maid produces a really marvellous result in a very brief space of time. I remember recommending one to young Lady Lancing, and after three months her own husband did not know her.Jack. And after six months nobody knew her.Lady Bracknell. [Glares at Jack for a few moments. Then bends, with a practised smile, to Cecily.] Kindly turn round, sweet child. [Cecily turns completely round.] No, the side view is what I want. [Cecily presents her profile.] Yes, quite as I expected. There are distinct social possibilities in your profile. The two weak points in our age are its want of principle and its want of profile. The chin a little higher, dear. Style largely depends on the way the chin is worn. They are worn very high, just at present. Algernon!Algernon. Yes, Aunt Augusta!Lady Bracknell. There are distinct social possibilities in Miss Cardews profile.Algernon. Cecily is the sweetest, dearest, prettiest girl in the whole world. And I dont care twopence about social possibilities.Lady Bracknell. Never speak disrespectfully of Society, Algernon. Only people who cant get into it do that. [To Cecily.] Dear child, of course you know that Algernon has nothing but his debts to depend upon. But I do not approve of mercenary marriages. When I married Lord Bracknell I had no fortune of any kind. But I never dreamed for a moment of allowing that to stand in my way. Well, I suppose I must give my consent.Algernon. Thank you, Aunt Augusta.Lady Bracknell. Cecily, you may kiss me!Cecily. [Kisses her.] Thank you, Lady Bracknell.Lady Bracknell. You may also address me as Aunt Augusta for the future.Cecily. Thank you, Aunt Augusta.Lady Bracknell. The marriage, I think, had better take place quite soon.Algernon. Thank you, Aunt Augusta.Cecily. Thank you, Aunt Augusta.Lady Bracknell. To speak frankly, I am not in favour of long engagements. They give people the opportunity of finding out each others character before marriage, which I think is never advisable.Jack. I beg your pardon for interrupting you, Lady Bracknell, but this engagement is quite out of the question. I am Miss Cardews guardian, and she cannot marry without my consent until she comes of age. That consent I absolutely decline to give.Lady Bracknell. Upon what grounds may I ask? Algernon is an extremely, I may almost say an ostentatiously, eligible young man. He has nothing, but he looks everything. What more can one desire?Jack. It pains me very much to have to speak frankly to you, Lady Bracknell, about your nephew, but the fact is that I do not approve at all of his moral character. I suspect him of being untruthful. [Algernon and Cecily look at him in indignant amazement.]Lady Bracknell. Untruthful! My nephew Algernon? Impossible! He is an Oxonian.Jack. I fear there can be no possible doubt about the matter. This afternoon during my temporary absence in London on an important question of romance, he obtained admission to my house by means of the false pretense of being my brother. Under an assumed name he stayed to tea, and devoured every single muffin. And what makes his conduct all the more heartless is, that he was perfectly well aware from the first that I have no brother, that I never had a brother, and that I dont intend to have a brother, not even of any kind. I distinctly told him so myself yesterday afternoon.Lady Bracknell. Ahem! Mr. Worthing, after careful consideration I have decided entirely to overlook my nephews conduct to you.Jack. That is very generous of you, Lady Bracknell. My own decision, however, is unalterable. I decline to give my consent.Question 1Part AIn The Importance of Being Earnest, which type of character is Jack?staticdynamicroundflatQuestion 2Part BWhat is Jack's role in the play? He is complex and makes an impression on the reader.He one dimensional and serves to support the main character.His behavior changes by the end of the play.He is the most undeveloped of all the characters. In what ways has a social group positively influenced your behavior? Check all that apply.volunteering in your communityeating healthy foodexercising regularlybeing kind to a classmate who was being bulliedwelcoming new studentsworking hard to do well on a test or assignmentparticipating in school activities Why was it difficult to publish newspapers before the printing press was invented?A. It had to be handwritten or printed using time-consuming methods.B. It was too difficult to send it quickly.C. It took a long time to print.D. It required significant amounts of paper and ink. Its question 2 Help I will fail if I dont get this done and it is so confusing. Math is just ending me right now. :( what is Newton first law 8.The Johnsons framed a family picture to hang on the wall. The perimeter of the frame is 72 inches. Use the formula P = 2 + 2w to find the length of the frame if the width is 19 inches.A. 15 in.B. 17 in.C. 20 in.D. 19 in. Tilly the dog barks every 9 seconds.Billy the dog barks every 12 seconds.They both bark at the same time.After how many seconds will they next bark at the same time? When looking at a firm's behavior, you know it is engaging in price discrimination when it:__________ a. charges a different price to different customers that is not reflective of the firm's costs. b. charges customers more than they would prefer to pay. c. asks about personal information such as race, gender, and sexual orientation before offering services. d. does not accept payment with a smartphon How does population growth differ between developing countries and developed countries? What might account for these differences? radius = 3 4/5 mHubby bbb bbb. Which statement best explains why the Renaissance first developed in cities like Florence and Venice? what is the formula to calculate the perimeter of the circle HELP ITS DUE IN 5 MINUTES Whats the main idea in the story The legend of King Arthur In Triangle QRS, X is the midpoint of QR, Y is the midpoint of RS, and Z is the midpoint of QS.Also, XR = 5, YS = 7, and QS = 20.What is the perimeter of the Triangle XYZ?