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
madreJ [45]
3 years ago
12

Which of the following is not true about designing classes? In order for class information to be printed instead of a memory add

ress, a toString method should be declared. The constructor must be declared as public. All class variables should be declared as private. To test for equality the programmer should define an equals method. All methods should be declared private.
Computers and Technology
1 answer:
Leokris [45]3 years ago
6 0
'<span>All methods should be declared private</span>' is not true for classes. One should be able to change the properties of objects, and to do this safely and in a controlled manner, some public methods are declared. Some private methods can also be declared for more potentially sensitive operations for being called from within the class. 
You might be interested in
Write the addReview method, which adds a single product review, represented by a ProductReview object, to the ReviewCollector ob
maw [93]

Answer:

Explanation:

namespace Jeroen\ReviewIntegration\Observer;

use Magento\Framework\Event\ObserverInterface;

class ProductReview implements ObserverInterface

{

    protected $_storeManager;

    protected $_request;

    public function __construct(

        \Magento\Store\Model\StoreManagerInterface $storeManager,

        \Magento\Framework\App\Request\Http $request

    ) {

        $this->_storeManager = $storeManager;

        $this->_request = $request;

    }

    public function execute(\Magento\Framework\Event\Observer $observer)

    {

         return 'test';

    }

}

5 0
3 years ago
3.14 LAB: Simple statistics for Python
Ad libitum [116K]

Answer:

Following are the correct python code to this question:

n1 = float(input('Input first number: '))#input first number  

n2 = float(input('Input second number: '))#input second number  

n3 = float(input('Input third number: '))#input third number  

n4 = float(input('Input fourth number: '))#input fourth number  

average = (n1+n2+n3+n4)/4 #calculate input number average

product = n1*n2*n3*n4 # calculate input number product

print('product: {:.0f}  average: {:.0f}'.format(round(product),round(average))) #print product and average using round function

print('product: {:.3f}  average: {:.3f}'.format(product,average)) #print product and average value

Output:

Please find the attachment.

Explanation:

The description of the above python code can be defined as follows:

  • In the above python program four variable "n1, n2, n3, and n4" is defined, in which we take input from the user end, and in these user inputs we use the float method, that converts all the input value in to float value.
  • In the next step, two variable average and product are defined, that calculate all input numbers product, average, and hold value in its variable.
  • In the last line, the print method is used, which prints its variable value by using a round and format method.

8 0
4 years ago
Early word processors ran on devices that look like digital
S_A_V [24]

Answer:

True

Explanation:

The word processor used to be the only office machine in the year 1960s, that combined the keyboard text-entry and various printing functions of an electric typewriter with the recording memory. And this recording unit was a tape or a floppy disk, with the simplest of processor applied for text editing. Hence, the above statement that the early word processors ran on the devices that look like digital is true.

6 0
3 years ago
Read 2 more answers
Does anybody know the answer to 5.7.5: Factorial of Code HS? I can’t figure it out
shutvik [7]

function myFunction(num){

 n = 0;

 total = 1;

 while (n < num){

   total *= (num - n);

   n+=1;

 }

 return total;

}

alert(myFunction(6));

I'm not too proficient in JavaScript but here's what the function would look like. I hope this helps!

4 0
3 years ago
Read 2 more answers
Ou have an application running on Oracle Cloud Infrastructure. You identified that the read and write operations are slowing you
Otrada [13]

Answer:

Options A and C.

Explanation:

In Oracle Cloud Infrastructure the two options which allows you to increase disk performance are;

1. Terminate the compute instance preserving the boot volume. Create a new compute instance using a VM Dense IO shape using the boot volume preserved.

2. Create a backup of the boot volume. Create a new compute instance a VM Dense IO shape and restore the backup.

3 0
3 years ago
Other questions:
  • would specify that only selected members of the payroll and human resources department would have the right to change sensitive
    11·1 answer
  • Which destination ip address is used when an ipv6 host sends a dhcpv6 solicit message to locate a dhcpv6 server?
    15·1 answer
  • WHERE WAS THE CHEESEBURGER INVENTED?
    9·1 answer
  • Please help me answer this question
    14·1 answer
  • Write a program that inputs a time from the console. The time should be in the format "HH:MM AM" or "HH:MM PM". Hours may be one
    6·1 answer
  • Given a matrix input_matrix, return a Numpy array that consists of every entry of A that has: an even row index in the range [0,
    9·1 answer
  • When Creating a FPS game what basic rules would you add?
    12·1 answer
  • Q1 To remove filter
    15·2 answers
  • To configure a router/modem, what type of IP interface configuration should you apply to the computer you are using to access th
    10·1 answer
  • Most scheduling algorithms maintain a run queue, which lists processes eligible to run on a processor. On multicore systems, the
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!