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
Nady [450]
3 years ago
14

Create a Java program that will store 10 student objects in an ArrayList, ArrayList. A student object consists of the following

fields:
int rollno
String name
String address

Implement a comparator class to sort student objects by rollno (roll number). Implement your own merge sort method and place your code in a separate Java source file. Do not use a sort method from the Java collections library.

Computers and Technology
1 answer:
Crank3 years ago
5 0

Answer:

Following is given the detailed java program as needed.

Last image displays the output of the program

I hope it will help you!

Explanation:

You might be interested in
What is role can ICT play in helping school take part in social responsibility
stich3 [128]

Answer:

The answer is below

Explanation:

Given that Social responsibility deals with ideas that individuals or groups of people are expected or bound to work in alliance with other individuals or groups of people in favor of the generality of society.

Hence, some of the role ICT can play in helping school take part in social responsibility are:

1. Helps students to have independent access to knowledge

2. It assists the students with special needs

3. It helps the teachers to teach outside the comfort of the classroom only.

4. It exposes teacher and students to more knowledge and opportunities

5. The school governing body can access people and the community's opinions about ways to improve the school better.

6. It exposes the school to more ideas and opportunities.

7. It can be used to assist the school in improving the quality of education, both for the teachers and students side.

3 0
3 years ago
Here is the problem specification: An Internet service provider has three different subscription packages for its customers: Pac
Andrej [43]

Answer:

In C++:

#include <iostream>

using namespace std;

int main(){

   int hour; char pkg; float bill = 0;

   cout<<"Package: "; cin>>pkg;

   cout<<"Hour: "; cin>>hour;

   if(hour<=744 && hour >=0){

       switch (pkg) {

           case 'A':

               bill = hour * 9.95;

               if(hour >10){bill = 10 * 9.95 + (hour - 10) * 2;}

           break;

           case 'B':

               bill = hour * 14.5;

               if(hour >10){bill = 20 * 14.5 + (hour - 20) * 1;}

           break;

           

           case 'C':

               bill = 19.95;

           break;

           

           default:

               cout << "Package must be A, B or C";}

cout<<"Total Bills: $"<<bill; }

else{ cout<<"Hour must be 0 - 744"; }

return 0;

}

Explanation:

This declares all variables:    int hour; char pkg; float bill=0;

This prompts the user for package type:  cout<<"Package: "; cin>>pkg;

This prompts the user for number of hours:    cout<<"Hour: "; cin>>hour;

This checks if hour is between 0 and 744 (inclusive)

   if(hour<=744 && hour >=0){

If true, the following is executed

A switch statement to check valid input for package

       switch (pkg) {

For 'A' package

           case 'A':

Calculate the bill

<em>                bill = hour * 9.95;</em>

<em>                if(hour >10){bill = 10 * 9.95 + (hour - 10) * 2;}</em>

End of A package:            break;

For 'B' package

           case 'B':

Calculate the bill

<em>                bill = hour * 14.5;</em>

<em>                if(hour >10){bill = 20 * 14.5 + (hour - 20) * 1;}</em>

End of B package:<em>            </em>break;

For C package            

           case 'C':

Calculate bill:                bill = 19.95;

End of C package:            break;

If package is not A, or B or C

           default:

Prompt the user for valid package                cout << "Package must be A, B or C";}

Print total bills: cout<<"Total Bills: $"<<bill; }

If hour is not 0 to 744: <em>else{ cout<<"Hour must be 0 - 744"; }</em>

6 0
3 years ago
In risk management what does risk evaluation involved
VLD [36.1K]

Answer:

Explanation:Risk management is the decision-making process involving considerations of political, social, economic and engineering factors with relevant risk assessments relating to a potential hazard so as to develop, analyze and compare regulatory options and to select the optimal regulatory response for safety from that hazard.

5 0
3 years ago
Why is sequencing important?
S_A_V [24]

Answer:

C

Explanation:

If it wasn't in order then the code would fail

4 0
3 years ago
Read 2 more answers
Which soft skill involves the ability to work harmoniously with your colleagues and improve productivity?
Lina20 [59]
B.Teamwork is a soft skill involves the ability to work harmoniously with your colleagues and improve productivity. It is the collaborative effort of a team to complete a task or to achieve a common goal in the most effective and efficient way.  

 


4 0
3 years ago
Other questions:
  • The set of specific, sequential steps that describe exactly what a computer program must do to complete the work is called a(n)
    10·2 answers
  • When computers are connected and operate through one main computer, it is called a _________ network
    14·2 answers
  • When you reach a YIELD sign, yield to cross traffic and ____ before you enter the intersection.
    14·2 answers
  • Why is the following statement true - ideally, your information is abbreviated
    10·2 answers
  • Ed-Only g - Last Modified: November 2 -
    14·1 answer
  • Which view allows you to make changes to the content of your presentation?
    13·1 answer
  • Moving your Sprite from right to left is considered the X coordinate?
    5·1 answer
  • What is the most common representation of a distribution?
    14·1 answer
  • 9.2.8 last names codehs
    10·1 answer
  • each data mining technique has its advantages and limitations. which data mining technique mimics the neural structure of the br
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!