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
s2008m [1.1K]
3 years ago
8

1. What are the built-in operations on classes?

Computers and Technology
1 answer:
Kobotan [32]3 years ago
6 0

Answer:

Assignment Operator

Member Selection Operator

Explanation:

Assignment Operator is useful to assign some value to the instance variables of classes. We can use this operator directly on the class.

example:

Simple s=new Simple();

s.salary=9000;

Member Selection operator is useful to select a member of the class.

below code explains Member Selection operator

example:

Test s;

Test *pS = new Test();

s.f() ;  //call function using non-pointer object

pS->f();

You might be interested in
Which line in the following program will cause a compiler error?
Viktor [21]

Answer:

The answer is "Option A".

Explanation:  

  • In the given C++ Language program on line 8 compile-time error will occur, because in the code the conditional statement is used. In if block, we check two conditions together, which is the number variable value is greater than equal to 0 and check less than equal to 100.  
  • In this condition statement, a AND operator is used that execute when both condition is true, but in the last condition, we do not define a variable name that, checks value. That's why the program will give an error on line 8.
3 0
3 years ago
It is important to keep a copy of your written plan and safety records off-site. A) True B) False
mel-nik [20]

The answer for the question is true

3 0
3 years ago
Read 2 more answers
Question 3 (8 marks): Write a program that takes a string from the user and splits it into a list using a space (" ") as the del
bonufazy [111]

Answer:

In Python:

mystr = input("Sentence: ")

mylist = []

word = ""

for i in range(len(mystr)):

   if not i == len(mystr)-1:

       if not mystr[i] == " ":

           word+=mystr[i]

       else:

           mylist.append(word)

           word = ""

   else:

       word+=mystr[i]

       mylist.append(word)

print(mylist)

Explanation:

Prompt the user for an input sentence

mystr = input("Sentence: ")

Initialize an empty list

mylist = []

Initialize each word to an empty string

word = ""

Iterates through the input sentence

for i in range(len(mystr)):

If index is not the last, the following if condition is executed

   if not i == len(mystr)-1:

If the current character is not space

       if not mystr[i] == " ":

Append the character to word

           word+=mystr[i]

If otherwise

       else:

Append word to the list

           mylist.append(word)

Set word to an empty string

           word = ""

If otherwise; i.e. If index is not the last

   else:

Append the last character to word

       word+=mystr[i]

Append word to the list

       mylist.append(word)

Print the list

print(mylist)

5 0
3 years ago
Edhisive 3.5 code practice
Amanda [17]

Answer:

x = int(input("What grade are you in? "))

if (x == 9):

   print ("Freshman")

elif (x == 10):

   print("Sophomore")

elif (x == 11):

   print ("Junior")

elif (x == 12):

   print("Senior")

else:

   print ("Not in High School")

Explanation:

7 0
3 years ago
What is information technology ?​
ella [17]
Information technology can be defined as the study or use of systems for storing, retrieving, and sending information. Can be abbreviated to IT.
7 0
3 years ago
Read 2 more answers
Other questions:
  • Type the correct answer in the box.
    7·1 answer
  • The Task Manager cannot be used to turn Services on and off.<br> True or False?
    8·2 answers
  • Discuss how advertising on the Web affects search results and the ethical dilemmas associated with it.
    5·1 answer
  • What is the minimum number of data points you should usually have to look for signs of improvement on a run chart?
    8·1 answer
  • Jim maintains attendance records for his employees for the year. Row B includes the dates of attendance, and column A includes t
    5·2 answers
  • Why don’t we need to know and memorize the IP addresses for our favorite websites?
    15·1 answer
  • Write a C program to input basic salary of an employee and calculate gross salary according to given conditions.
    11·1 answer
  • Which three factors should be discussed before planning and building a project?
    15·1 answer
  • What command would Emile use in his word processing software to insert a bar chart that will automatically adjust to changes mad
    6·2 answers
  • Find the total cost of a $125 coat purchased in Los Angeles County where the sales tax is 9%. Use the expression c + 0.09c
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!