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
True [87]
4 years ago
11

In object oriented programming, every object...

Computers and Technology
1 answer:
Westkost [7]4 years ago
5 0

Answer:

In object oriented programming, every object is an instance of the class.

Explanation:

In OOP, every object is initialized as an instance of the class. The concept is just similar to the way we simply instantiate a variable of class type, let's say integer, so we write 'int x'. Similar is the case with when you have to instantiate an object of a class. Objects always have the same behaviors of their class. Every time you instantiate a new object from a class, you get a new copy of each of the class's instance variables. These copies are associated with the new object.

Tags: OOP, instance, object, class, object oriented programming

You might be interested in
How many line ofoutput will be displayed by the following program fragment?
nexus9112 [7]

Answer:

Hi!

Let's make a quick debug of the code:

i    j   Output

0+0 =  0  

0+1 =    1

0+2 =  2

0+3 =  3

1+0 =  1 

1+1 =    2

1+2 =  3

1+3 =  4

2+0 =  2  

2+1 =    3

2+2 =  4

2+3 =  5

3+0 =  3  

3+1 =   4

3+2 =  5

3+3 =  6

4+0 =  4  

4+1 =   5

4+2 =  6

4+3 =  7

The total outputs is 20.

Explanation:

In the first iterations of the loop for the final value of the <em>i</em> is 1 and the final condition to stop of the do while is (<em>i</em> < 5) , so the iteration of for continues many times until  <em>i</em> break the condition.  

(5*4 = 20)

And after that you get 20 outputs.

I hope it's help you.

6 0
3 years ago
An increase in pay because of how well you do a job is called _____.
sleet_krkn [62]
It's either a raise or a promotion.
4 0
3 years ago
Read 2 more answers
What are the factors affecting the purchasing decision for dbms software?
djverab [1.8K]
T<span>he factors affecting the purchasing decision for dbms software are : 
</span><span>a) Cost
b) DBMS features and tools
c) Underlying model
d) Portability
e) DBMS hardware requirements</span>
3 0
4 years ago
Read 2 more answers
Write a program with a method that plays the guess a number game. The program should allow the user to pick a number between 1 a
nlexa [21]

Answer:

Please check the explanation

Explanation:

That's the code and it is done with the program in c++ according to instructions given in the question using binary search. It can guess the correct number in 10 or fewer attempts and also shows the number of attempts it took to guess the number.

​ #include <iostream> using namespace std; int guess() { string input; int l = 1, h = 1000; int mid = (l + h) / 2, count = 0; while (1) { //count the number of attemts to guess the number ++count; //cout << count << "\n"; cout << "\n"; cout << "Is " << mid << " correct? (y/n): "; cin >> input; //if input is y print the guessed no. and return if (input == "y") { cout << mid << " guessed in " << count << " attempts!\n"; return 1; } //if input is n ask the user if it's higher or lower than current guess if (input == "n") { cout << "Is the number greater than or less than the number ? (h/l): "; cin >> input; } //if input is higher assign mid incremented by 1 to low //else decrement mid by 1 and assign to high if (input == "h") l = mid + 1; else h = mid - 1; //calculate mid again according to input by user again mid = (l + h) / 2; } } int main() { cout << "****WELCOME TO THE GUESS THE NUMBER GAME!****\n"; cout << "Guess any number between 1 to 1000.\n"; cout << "This game depends on user giving correct answers and not changing their number middle of game.\n"; guess(); } ​

8 0
3 years ago
In this lab, you complete a Python program that calculates an employee's annual bonus. Input is an employee's first name, last n
HACTEHA [7]

Answer:

The program is as follows (See attachment)

Comments are used to explain some lines

Fname = input("Enter Employee First Name: ")

Lname = input("Enter Employee Last Name: ")

Salary = float(input("Enter Employee Salary: "))

Ratings = int(float(input("Enter Employee Ratings: ")))

#Initialize bonus rate to 0; This will be used if ratings is 4 or 4

bonusRate = 0.0

if Ratings == 1:

       bonusRate =0.25 #If ratings is 1, bonus rate is 0.25

elif Ratings == 2:

       bonusRate = 0.15 #If ratings is 2, bonus rate is 0.15

elif Ratings == 3:

       bonusRate = 0.1 #If ratings is 3, bonus rate is 0.1

bonus = Salary * bonusRate

print(Lname+" "+Fname+"'s employee bonus is "+str(bonus))

#End of Program

Explanation:

The program saves the employee's first name and last name in variables Fname and Lname, respectively

The employee's salary is saved as float datatype in variable Salary

The employee's ratings is saved as int datatype in variable Ratings

For ratings greater than or equal to 4, the bonusRate is set to 0.0; this is done on line 6 of the program

Line 7 to 12 check if employee Ratings is 1, 2 or 3 and the respective bonusRate is used

Line 13 calculates the employee's bonus

Line 14 prints the employee's bonus

The program is ended on line 15

8 0
4 years ago
Other questions:
  • Wendy is an attacker who recently gained access to a vulnerable web server running Microsoft Windows. What command can she use t
    9·1 answer
  • Plz answer me will mark as brainliest ​
    7·2 answers
  • Explain what a surrogate key is.
    13·1 answer
  • Choose the correct statement about the UNIX family of operating systems:
    7·1 answer
  • What stylistic device does Reverend Jesse Jackson use in the following statement: "We must relate instead of debate; we must ins
    10·1 answer
  • In step 4 of the CSMA/CA protocol, a station that successfully transmits a frame begins the protocol to transmit a second frame
    9·1 answer
  • Click to review the online content. Then answer the question(s) below, using complete sentences. Scroll down to view additional
    14·2 answers
  • Desirable workplace habits and skills include:
    14·1 answer
  • Which of the following is a good conductor of electricity and heat?
    13·2 answers
  • It is for employees to make mistakes that compromise the security of an organization’s computer devices and sensitive informatio
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!