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
ser-zykov [4K]
3 years ago
10

Say you write a program that makes use of the Random class, but you fail to include an import statement for java.util.Random (or

java.util\.\*). What will happen when you attempt to compile and run your program. a. The program won't run, but it will compile with a warning about the missing class. b. The program won't compile-you'll receive a syntax error about the missing class. c. The program will compile, but you'll receive a warning about the missing class. d. The program will encounter a runtime error when it attempts to access any member of the Random class none of the above
Computers and Technology
1 answer:
Levart [38]3 years ago
6 0

Explanation:

you can find that question in social media

You might be interested in
Write a program whose input is two integers, and whose output is the first integer and subsequent increments of 5 as long as the
Anna11 [10]

Answer:

The program in Python is as follows:

num1 = int(input())

num2 = int(input())

if num2 < num1:

   print("Second integer can't be less than the first.")

else:

   for i in range(num1,num2+1,5):

       print(i,end=" ")

Explanation:

This gets the first integer from the user

num1 = int(input())

This gets the second integer from the user

num2 = int(input())

If the second is less than the first, the following prompt is printed

<em>if num2 < num1:</em>

<em>    print("Second integer can't be less than the first.")</em>

If otherwise, the number between the intervals is printed with an increment of 5

<em>else:</em>

<em>    for i in range(num1,num2+1,5):</em>

<em>        print(i,end=" ")</em>

<em />

6 0
2 years ago
The following code accomplishes which of the tasks written below? Assume list is an int array that stores positive int values on
worty [1.4K]

Answer:

it stores the largest value in list (the maximum) in foo

Explanation:

Initially foo is assigned as the first element of the list

Inside the loop, every element in the list will be compared with foo, starting from the second element. If an element is greater than foo, the new value of the foo will be that element. At the end of the loop, foo will be equal to the largest element in the list.

5 0
2 years ago
What's the biggest security issue with using social networking sites to market your listings?
Savatey [412]

The biggest security issue with using social networking sites to market your listings is Criminals may use social networking sites to identify your personal data.

<h3>What is a social marketing site?</h3>

A social marketing site is a site where people from around the world are connected in one place and share their thoughts and photos and other data.

The social sites are on the internet and there is a chance of stealing data and it identity theft, phishing, online predators, internet fraud, and other cybercriminal attacks are also some risks.

Thus, the largest security concern with using social networking sites to sell your listings is that thieves could use these sites to find personal information about you.

To learn more about social marketing sites, refer to the link:

brainly.com/question/15051868

#SPJ4

6 0
1 year ago
which application software allows you to compose written ideas on a computer? database, spreadsheet, word processor or graphics
Kazeer [188]
Word processor because it's more for writing
8 0
2 years ago
Develop a plan to design and finally implement a set of functions using C++ that would implement the IEEE standard. Phase 1 will
AnnZ [28]

Answer:

See explaination code

Explanation:

#include<iostream>

#include<math.h>

using namespace std;

typedef union {

float number;

struct

{

// Order is important.

// Here the members of the union data structure

// use the same memory (32 bits).

// The ordering is taken

// from the LSB to the MSB.

unsigned int mantissa : 23;

unsigned int exponent : 8;

unsigned int sign : 1;

} Raw;

} MyFloat;

void printBinary(int n, int i)

{

// Prints the binary representation

// of a number n up to i-bits.

int k;

for (k = i - 1; k >= 0; k--) {

if ((n >> k) & 1)

cout << "1";

else

cout << "0";

}

}

void decToHex(int n){

// char array to store hexadecimal number

char hexaDeciNum[100];

// counter for hexadecimal number array

int i = 0;

while(n!=0)

{

// temporary variable to store remainder

int temp = 0;

// storing remainder in temp variable.

temp = n % 16;

// check if temp < 10

if(temp < 10)

{

hexaDeciNum[i] = temp + 48;

i++;

}

else

{

hexaDeciNum[i] = temp + 55;

i++;

}

n = n/16;

}

// printing hexadecimal number array in reverse order

for(int j=i-1; j>=0; j--)

cout << hexaDeciNum[j];

}

void floatBinary(float f){

long double binaryTotal, binaryFrac = 0.0, frac, fracFractor = 0.1;

long int integer, binaryInt = 0;

long int p = 0, rem, temp;

//separate the integer part from the input floating number

integer = (int)f;

//separate the fractional part from the input floating number

frac = f - integer;

//loop to convert integer part to binary

while (integer != 0) {

rem = integer % 2;

binaryInt = binaryInt + rem *pow(10, p);

integer = integer / 2;

p++;

}

//loop to convert fractional part to binary

while (frac != 0) {

frac = frac * 2;

temp = frac;

binaryFrac = binaryFrac + fracFractor * temp;

if (temp == 1)

frac = frac - temp;

fracFractor = fracFractor / 10;

}

cout << binaryInt + binaryFrac;

}

int findDecimal(float number){

int nfloor = number;

float nfloat = number - nfloor;

int nfloatfloor;

do {

nfloat *= 10;

nfloatfloor = nfloat;

} while (nfloat > nfloatfloor);

return nfloatfloor;

}

void first(float number){

if(number < 0)

cout << "SIGN BIT IS (1) SINCE NUMBER IS NEGATIVE" << endl;

else

cout << "SIGN BIT IS (0) SINCE NUMBER IS POSITIVE" << endl;

}

void second(float number){

cout << "INTEGER PART IN BASE-10:" << int(number) << " AND IN BINARY:";

printBinary(int(number),16);

cout << endl;

}

void third(float number){

cout << "DECIMAL PART IN BASE-10:" << findDecimal(number) << " AND IN BINARY:";

printBinary(findDecimal(number),16);

cout << endl;

}

void fourth(float number){

cout << "ENTERED NUMBER IN BASE-10:" << number << " AND IN BINARY:";

floatBinary(number);

cout << endl;

}

void fifth(MyFloat myfloat){

cout << "MANTISA IN BINARY:";

printBinary(myfloat.Raw.mantissa,32);

}

void sixth(MyFloat myfloat){

cout << "EXPONENT IN BASE-10:" << myfloat.Raw.exponent << " AND IN BINARY:";

printBinary(myfloat.Raw.exponent,8);

cout << endl;

}

void seventh(MyFloat myfloat){

cout << myfloat.Raw.sign << " | ";

printBinary(myfloat.Raw.exponent,8);

cout << " | ";

printBinary(myfloat.Raw.mantissa,32);

cout << endl;

}

void eigth(MyFloat myfloat){

cout << myfloat.Raw.sign << " | ";

decToHex(myfloat.Raw.exponent);

cout << " | ";

decToHex(myfloat.Raw.mantissa);

cout << endl;

}

int main(){

float number;

cout << "PLEASE ENTER A NUMBER TO DISPLAY THE IEEE 754 FLOATING POINT OPTIONS" << endl;

cin >> number;

MyFloat myfloat;

myfloat.number = number;

cout << "PLEASE CHOOSE ONE OF THE FOLLOWING OPERATIONS" << endl;

cout << " 1. DISPLAY THE SIGN BIT VALUE" << endl;

cout << " 2. DISPLAY THE INTEER PART IN BOTH BASE-10 AND CINARY FORMATS" << endl;

cout << " 3. DISPLAY THE DECIMAL PART IN BOTH BASE-10 AND BINARY FORMATS" << endl;

cout << " 4. DISPLAY THE NUMBER ENTERED IN BOTH BASE-10 AND BINARY FORMATS" << endl;

cout << " 5. DISPLAY THE MANTISA IN BINARY FORMATS" << endl;

cout << " 6. DISPLAY THE EXPONENT IN BORH BASEE-10 AND BINARY FORMATS" << endl;

cout << " 7. DISPLAY THE IEEE 754 SINGLE PRECISION BINARY LAYOUT" << endl;

cout << " 8. DISPLAY THE IEEE 754 SINGLE PRECISION BINARY LAYOUT" << endl;

int choice;

cin >> choice;

switch(choice){

case 1:first(number);

break;

case 2:second(number);

break;

case 3:third(number);

break;

case 4:fourth(number);

break;

case 5:fifth(myfloat);

break;

case 6:sixth(myfloat);

break;

case 7:seventh(myfloat);

break;

case 8:eigth(myfloat);

break;

default:cout << "ENTER VALID CHOICE" << endl;

}

}

Refer to attachment please for onscreen look.

6 0
2 years ago
Other questions:
  • You notice that lately your computer has been running slow. When you open up your web browser, you get endless pop-up ads to the
    8·1 answer
  • When you purchase software in a box, reading the ________ is important to know if the software will function properly?
    13·1 answer
  • The mathematical constant Pi is an irrational number with value approximately 3.1415928... The precise value of this constant ca
    12·1 answer
  • Write a program with a method computeCommission which takes a double that is the salesAmount and returns the commissions for sal
    9·1 answer
  • @anthonydboss23<br><br> it’s goldielove6 <br><br> .....this is not a question everyone ignore this
    11·2 answers
  • Write a string class. To avoid conflicts with other similarly named classes, we will call our version MyString. This object is d
    5·1 answer
  • Including the word OR will make a search less specific.<br> O False<br> O True
    8·2 answers
  • Which of the following component is required to insert text in multimedia
    8·1 answer
  • Why media is far from government​
    6·2 answers
  • What do people in the movie e.t think about the character E.T
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!