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
vodka [1.7K]
3 years ago
9

Suppose a developer gets class XYZ files and documentation from a subcontractor. This class does not implement the Comparable in

terface. What must be true in order for the developer to sort an array of XYZ objects without modifying the xyz class?a. The developer must supply a comparator object belonging to a class that implements the Comparator interface.b. XYZ objects must be randomly distributed.c. The XYZ class must implement the Sortable interface.d. XYZ objects must be ordered.
Computers and Technology
1 answer:
NNADVOKAT [17]3 years ago
6 0

Answer:

A) The developer must supply a comparator object belonging to a class that implements the Comparator interface

Explanation:

The comparator interface handles the ordering (sorting) of user-defined classes, it does this by comparing two different objects from different classes. The comparator interface works by accepting a method which extracts a key for sorting of a type say N, and returns a comparator that compares to N, it therefore compares the object (current one) with the specified one

You might be interested in
What is the mass of a cookbook
tatiyna

Answer:

it varies on the size of the cookbook

Explanation:

6 0
3 years ago
This procedure protects against the loss of data
Arte-miy333 [17]
Data Backup and Recovery is the procedure that protects against the loss of data. It is to protect the crucial data against losing in events like physical disaster, database corruption, hardware failures, and other incident that can cause the data to lose.
6 0
3 years ago
Before going into space, astronauts spend many hours training on flight simulators allowing them to learn how to fly without lif
MaRussiya [10]

Answer:

The short answer is, for full-mission flight simulators, specifically by NASA, are built with actual hardware and supported by simulation software. These software take into account every possible scenarios that could be adjusted based on the training. As for the hardware, they receive signals from the software on what they should do.

Explanation:

Some technologies involved are (which are also part of the FAA's requirements):

  1. 6 Degrees of Freedom for motion
  2. Visual systems
  3. Realistic acoustics
  4. Visual effects

This also involves a lot of robotics.

On the topic of motion:

One big and important feature is how motion is simulated - which takes a combined effort of both software and hardware to actually simulate how external forces can also affect the body.

It also takes into account the vibration that is experienced during launch.

The 6 degrees of freedom for motion includes:

  1. Up and down
  2. Left and right - sliding motion
  3. Back and forward
  4. Yaw - turning motion
  5. Pitch - look up and down
  6. Roll

For flight simulators, there are several levels and requirements being used in the aviation training industry. But one thing that you need to know is that the hardware and software mostly take into account motion.

On the topic of visual systems:

The pilots or crew should have a visual representation of what the outside world looks like with at least 150 degrees of view.

Realistic acoustics:

During simulations, actual sounds should also be present based on the real-life sounds produced during flight.

Visual effects:

If the pilot pivots to the right, or is about to breach the exosphere, the system's display should also take that into account and show it to the crew. This also includes visual effects for specific motions being done.

And as a bonus:

Just until recently, everything was analog (meaning, with dials, buttons, and levers) for the actual aircraft simulation that the pilots/astronauts are using. Update are now being made in NASA and SpaceX along with other rocket and spacecraft companies to move from analog to digital (with touch screens).

While this is an abridged version, it should help you to understand the complexities of a flight simulator.

8 0
3 years ago
Write a Dice Game program that generates two random dice values between 1 and 6 for you, and 2 for the computer. You get to roll
charle [14.2K]

Answer:

#include <iostream>

#include <time.h>

#include <string>

using namespace std;

int main(){

srand(time(NULL));

cout<<"Throw dice"<<endl;

int b =0;

int a=0;

a=rand()%6;

b=rand()%6;

for (int i =0;i<1;i++)

{cout<<"dice one: "<<a<<endl;}

for (int i =0;i<1;i++)

{cout<<"dice two: "<<b<<endl;}

if(a>b)

{cout<<"first dice won"<<endl;}

if(b>a)

{cout<<"second dice won"<<endl;}

else{cout<<"they are same"<<endl;

return main();

}

return 0;

}

Explanation:

/*maybe it help you it is almost done*/

6 0
2 years ago
In Linux, when logged in as a normal user with root privileges, which command must precede the apt-get command in the command li
siniylev [52]

Answer:

"sudo" is the command to get super user or root privileges in linux.

Explanation:

in order to install package with root privilege in linux, the command would be

sudo apt-get install <package name>

8 0
3 years ago
Other questions:
  • What is the software called that allows the user to create, access, and manage a database? question 8 options:
    10·1 answer
  • Why you should care about copyright
    13·1 answer
  • Approximately what percent of desktop PCs are used for work-related purposes?
    13·2 answers
  • ¿Es especial que mi cumpleaños sea el día de San Valentín?<br><br> si o no
    11·2 answers
  • Which of the following takes place during the research phase
    7·1 answer
  • Which part(s) of CAIN is realized through the use of message digest functions and hashes?
    14·1 answer
  • Assume phrase= "Peter Piper picked a peck of pickled peppers", What will be returned if phrase.search(/[aeiou]/) is called?
    9·1 answer
  • Most hard drives are divided into sectors of 512 bytes each. Our disk has a size of 16 GB. Fill in the blank to calculate how ma
    9·1 answer
  • Drag each label to the correct location on the image. Match the movie qualities with the right period of movies.
    8·1 answer
  • 1 pound is equivalent to how many grams?<br>A.463.59 grams<br>B.10 grams<br>C.59 grams<br>D.5 grams​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!