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
Ahat [919]
2 years ago
10

Classes cannot:

Computers and Technology
1 answer:
dexar [7]2 years ago
5 0

Classes cannot Initialize data members in the class definition.

B) Initialize data members in the class definition

<u>Explanation:</u>

Class is defined by end user data type where it can handle multiple data type and referred to other classes also. Class is also called as data structure object or object class.

Due to class methods total programming language coding style is changes. For example employee of an organization should hold his or her employee number, address detail, spouse details, salary details

Where in old style programming language we need to declare separate variable to hold the data types, where we can define employee as class which can hold employee number, address fields, and again define salary details as other class and add employee->employee number where key connect between to class which is called derived class.

You might be interested in
Why was unicode invented?
Julli [10]
Unicode was invented to create a "universal text", or a language framework that any computer or device could understand. 


5 0
3 years ago
Use semaphore(s) to solve the following problem. There are three processes: P1, P2, and P3. Each process Pi has a segment of cod
Lisa [10]

Answer:

See explaination

Explanation:

Here we will use two semaphore variables to satisfy our goal

We will initialize s1=1 and s2=1 globally and they are accessed by all 3 processes and use up and down operations in following way

Code:-

s1,s2=1

P1 P2 P3

P(s1)

P(s2)

C1

V(s2) .

P(s2). .

. C2

V(s1) .

P(s1)

. . C3

V(s2)

Explanation:-

The P(s1) stands for down operation for semaphore s1 and V(s1) stands for Up operation for semaphore s1.

The Down operation on s1=1 will make it s1=0 and our process will execute ,and down on s1=0 will block the process

The Up operation on s1=0 will unblock the process and on s1=1 will be normal execution of process

Now in the above code:

1)If C1 is executed first then it means down on s1,s2 will make it zero and up on s2 will make it 1, so in that case C3 cannot execute because P3 has down operation on s1 before C3 ,so C2 will execute by performing down on s2 and after that Up on s1 will be done by P2 and then C3 can execute

So our first condition gets satisfied

2)If C1 is not executed earlier means:-

a)If C2 is executed by performing down on S2 then s2=0,so definitely C3 will be executed because down(s2) in case of C1 will block the process P1 and after C3 execute Up operation on s2 ,C1 can execute because P1 gets unblocked .

b)If C3 is executed by performing down on s1 then s1=0 ,so definitely C2 will be executed now ,because down on s1 will block the process P1 and after that P2 will perform up on s1 ,so P1 gets unblocked

So C1 will be executed after C2 and C3 ,hence our 2nd condition satisfied.

4 0
3 years ago
Give a big-O estimate for the number additions used in this segment of an algorithm.
rjkz [21]
Big-O notation is a way to describe a function that represents the n amount of times a program/function needs to be executed. 

(I'm assuming that := is a typo and you mean just =, by the way) 

In your case, you have two loops, nested within each other, and both loop to n (inclusive, meaning, that you loop for when i or j is equal to n), and both loops iterate by 1 each loop.

This means that both loops will therefore execute an n amount of times. Now, if the loops were NOT nested, our big-O would be O(2n), because 2 loops would run an n amount of times.

HOWEVER, since the j-loop is nested within i-loop, the j-loop executes every time the i-loop <span>ITERATES. 
</span>
As previously mentioned, for every i-loop, there would be an n amount of executions. So if the i-loop is called an n amount of times by the j loop (which executes n times), the big-O notation would be O(n*n), or O(n^2). 

(tl;dr) In basic, it is O(n^2) because the loops are nested, meaning that the i-loop would be called n times, and for each iteration, it would call the j-loop n times, resulting in n*n runs.

A way to verify this is to write and test program the above. I sometimes find it easier to wrap my head around concepts after testing them myself.
3 0
3 years ago
Explain what qualifies a device to be called a computerized system​
Karolina [17]

Answer; A peripheral is a “device that is used to put information into or get information out of the computer.”[1]

There are three different types of peripherals:

Input, used to interact with, or send data to the computer (mouse, keyboards, etc.)

Output, which provides output to the user from the computer (monitors, printers, etc.)

Storage, which stores data processed by the computer (hard drives, flash drives, etc.)

Explanation:

7 0
3 years ago
22 POINTS IF YOU GET THIS RIGHTTTT<br><br> KACHOW!! Is a catchphrase used by?
dexar [7]
Lightning McQueen in the Disney movie, Cars

KACHOW
5 0
2 years ago
Read 2 more answers
Other questions:
  • Numbering exception conditions, which often uses hierarchical numbering, in a fully developed use case description is helpful to
    7·1 answer
  • True False The explicit location always tells you where users are located when they type the query.
    10·2 answers
  • Why would you set up a workbook to be shared if you are the only one using the workbook?
    7·1 answer
  • Write a program whose input is two integers and whose output is the two integers swapped. Ex: If the input is: 3 8 then the outp
    12·1 answer
  • What is the price of a k1 speed birthday party?
    7·2 answers
  • Customizing ads to people who had earlier visited the site is
    14·1 answer
  • It is believed that Taiwan is the original home of these early Oceania explorers. Maori Lapita Polynesians Aborigines
    13·2 answers
  • Enhancement of job satisfaction and productivity are key characteristics of which theoretical perspective of work design? ​
    6·1 answer
  • Learning Task 2: Identify what is being asked. Write your answers on your notebook 1. What Microsoft Office program is used for
    15·1 answer
  • Viruses that load from usb drives left connected to computers when computers are turned on are known as.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!