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
Mademuasel [1]
4 years ago
8

create a class rectangle with attributes length and width, each of which defaults to 1. provide methods that calculate the recta

ngle's perimeter and area. it has set and get methods for both length and width. the set methods should verify that length and width are each floating-point numbers larger than 0.0 and less than 20.0. write a program to test class rectangle.
Computers and Technology
1 answer:
Ludmilka [50]4 years ago
4 0

Answer:

20.0.0.0

Explanation:

You might be interested in
You can rotate a selected graphic by dragging a ________ rotation handle
kotykmax [81]

I guess the correct answer to the blank is round.

You can rotate a selected graphic by dragging a round rotation handle.

7 0
4 years ago
HURRY MY COMPUTER IS ABOUT TO DIE ILL GIVE BRAINLYESTn
loris [4]

Answer: D, C, E, are the answers! good luck.

Explanation:

5 0
3 years ago
A file is to be shared among different processes, each of which has a unique number. The file can beaccessed simultaneously by s
Finger [1]

Answer:

int sumid=0;    /* Shared var that contains the sum of the process ids currently accessing the file */

int waiting=0;   /* Number of process waiting on the semaphore OkToAccess */

semaphore mutex=1;   /* Our good old Semaphore variable ;) */

semaphore OKToAccess=0;    /* The synchronization semaphore */

get_access(int id)

{

    sem_wait(mutex);

    while(sumid+id > n) {

        waiting++;

        sem_signal(mutex);

        sem_wait(OKToAccess);

        sem_wait(mutex);

    }

    sumid += id;

    sem_signal(mutex);

}

release_access(int id)

{

    int i;

    sem_wait(mutex);

    sumid -= id;

    for (i=0; i < waiting;++i) {

        sem_signal(OKToAccess);

    }

    waiting = 0;

    sem_signal(mutex);

}

main()

{

    get_access(id);

    do_stuff();

    release_access(id);

}

Some points to note about the solution:

release_access wakes up all waiting processes. It is NOT ok to wake up the first waiting process in this problem --- that process may have too large a value of id. Also, more than one process may be eligible to go in (if those processes have small ids) when one process releases access.

woken up processes try to see if they can get in. If not, they go back to sleep.

waiting is set to 0 in release_access after the for loop. That avoids unnecessary signals from subsequent release_accesses. Those signals would not make the solution wrong, just less efficient as processes will be woken up unnecessarily.

5 0
3 years ago
Which of the following is not a type of bank?
andreyandreev [35.5K]
Where is the following banks that is listed?
3 0
3 years ago
Read 2 more answers
Ishmael would like to capture a selected potion of his screen and then capture action he performs on that selected portion. What
Natalija [7]

Answer: User the insert screen recording control

Explanation:

Since Ishmael wants to capture a selected potion of his screen l, after which he'll then capture the action that he performs on that selected portion, he should use the insert screen recording control.

It should be noted that on most keyboards, there's an "insert screen" button. Also, Ishmael can simply open the window that he wants to screenshot and then click the screenshot button.

Therefore, the correct option is B.

6 0
3 years ago
Other questions:
  • What formula would be used to add two cells together after the equal sign?
    9·2 answers
  • After saving her presentation initially, Leah realizes she needs to add another content slide. She adds the slide and is ready t
    7·1 answer
  • How do i end my current plan that i never signed up for, the basic one it charged me $24
    11·2 answers
  • A _____ is a control that tells the computer what task to perform.
    6·1 answer
  • Scanning low allows you to locate __________ before you hit them
    13·1 answer
  • What intangible benefits might an organization obtain from the development of an
    5·2 answers
  • What are the three primary components of an inbox?
    11·1 answer
  • Make a list of any four computer that were used in the history of computer.​
    6·1 answer
  • What is coupling in computer science <br><br>​
    13·2 answers
  • 8. When “arc rated” clothing is worn it must allow for what
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!