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
Naddika [18.5K]
3 years ago
6

Given a Student class, create a class with following characteristics:

Computers and Technology
1 answer:
Kay [80]3 years ago
8 0

Answer:

ssume that,

Maximum “students” count can be 10.

*Driver Class*

*Solution class*

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) {}

public Student[] getAllStudents() {}

};

You might be interested in
Write a program to sort the (name, age, score) tuples by descending order where name is string, age and score are numbers. The s
zimovet [89]

Answer:

The program in Python is as follows:

from operator import itemgetter

m = int(input("Number of records: "))

print("Name, Age, Score")

my_list =[]

for i in range(m):

   user_details = input()

   my_list.append(tuple((user_details.split(","))))

my_list.sort(key =  itemgetter(0, 1, 2))        

print("Sorted: ", my_list)

Explanation:

This imports the operator function from itemgetter

from operator import itemgetter

This gets the number of records, m

m = int(input("Number of records: "))

This prints the format of input

print("Name, Age, Score")

This initializes the list of tuples

my_list =[]

This iterates through m

for i in range(m):

This gets the details of each person

   user_details = input()

This appends the details to the tuple

   my_list.append(tuple((user_details.split(","))))

This sorts the tuple

my_list.sort(key =  itemgetter(0, 1, 2))        

This prints the sorted tuple

print("Sorted: ", my_list)

6 0
2 years ago
List the steps that you need to locate Microsoft Word on your computer
Olegator [25]
1.click windows start button on the bottom left corner
2. search Microsoft word
3.once Microsoft word is found right click on it
4. then you will see an option called "open file location"
5. then you will have the location of microsoft word
6 0
3 years ago
Which key should you press to leave the cell as it originally was?
GREYUIT [131]
The correct answer should be A. Delete
4 0
3 years ago
What is the missing part to have the output as 3 2 1 while count >0 : print(count) count -= 1
Natali [406]

Answer:

Explanation:

16

6 0
3 years ago
Which type of information could be displayed using this line graph?
ollegr [7]

Answer:

The first one I'm sorry if I'm wrong

3 0
3 years ago
Read 2 more answers
Other questions:
  • You can access decorative underlines and change their color through the ____ drop-down.
    8·1 answer
  • Describe any four rights of users of information systems.
    8·1 answer
  • Instructions:Select the correct answer from each drop-down menu. What type of font color should Kim select if she chooses a dark
    10·2 answers
  • Two-dimensional random walk (20 points). A two-dimensional random walk simulates the behavior of a particle moving in a grid of
    14·1 answer
  • What is the meaning of the term plot?<br>A. the final outcome of the story​
    8·1 answer
  • Which picture should i put as my profile picture.
    15·2 answers
  • Which of the following activities does an effective team do?
    15·2 answers
  • I made Pico with a Ray Gun (Next is Dad/Tankman)<br><br> Opinons?
    11·2 answers
  • What is a personal data?
    12·1 answer
  • What are two differences between a wide angle lens and a telephoto lens?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!