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
Write a program whose input is two integers and whose output is the two integers swapped. Ex: If the input is: 38 then the outpu
Likurg_2 [28]

Answer:

Following are the program in the C++ Programming Language.

#include <iostream>

using namespace std;

//define function for swapping

void SwapValues(int* userVal1,int* userVal2){  

//set integer variable to store the value

int z = *userVal1;

//interchange their value

*userVal1 = *userVal2;  

//interchange their value

*userVal2 = z;

}

//define main method

int main()

{    

//declare variables

int x,y;

//get input from the user

cin>>x>>y;

//Call the method to swap the values

SwapValues(&x,&y);

//print their values

cout<<x<<" "<<y;

return 0;

}

<u>Output</u>:

3 8

8 3

Explanation:

<u>Following are the description of the program</u>.

  • Firstly, we define required header file and function 'SwapValues()', pass two pointer type integer variables in argument that is 'userVal1' and 'userVal2'.
  • Set integer data type variable 'z' and initialize the value of 'userVal1' in it, then initialize the value of 'userVal2' in 'userVal1' and then initialize the value of 'z' in 'userVal2'.
  • Finally, define the main method in which we set two integer type variables and get input from the user in it then, call and pass those variables and print it.
6 0
3 years ago
I don't know the answer and I tried different ones and they not what the book is looking for.
Serhud [2]

Answer:

The complete program is:

import java.util.Scanner;

class Main

{

public static void main (String [] args) {

int numObjects;

Scanner scnr = new Scanner(System.in);

numObjects = scnr.nextInt(); // Program will be tested with values: 15, 40.

System.out.println(numObjects);

}

}

Explanation:

The program is as mentioned above, And we can check with inputs 15, and 40. And it was found that correct answer is obtained on running the program.

3 0
3 years ago
In a relational database, the three basic operations used to develop useful sets of data are:_________.
olga_2 [115]

In a relational database, the three basic operations used to develop useful sets of data are:

\sf\purple{a.\: Select, \:project,\: and\: join. }

\large\mathfrak{{\pmb{\underline{\orange{Mystique35 }}{\orange{❦}}}}}

6 0
2 years ago
In QBasic, create a number guessing challenge. Your program should generate a random number from 1-
Sergio039 [100]

Answer:

yes

Explanation:

6 0
2 years ago
If you wanted to buy a house that cost $150,000 and you knew you needed a down payment of five percent, how much would you need
andrew11 [14]

Answer:

7,500 is the answer

Explanation:

7,500 is 5% of 150,000

8 0
2 years ago
Other questions:
  • The operation of the waste spark Ignition system is being discussed. technician a says that the spark that occurs on the exhaust
    14·1 answer
  • Search engines enable you to
    13·2 answers
  • How is a cell named?
    12·1 answer
  • Which of the following is true about radio waves? They have short wavelengths. They have high energies. They reveal hot gases. T
    10·2 answers
  • Larry sent an email to Andy. Andy didn't open Larry's email but still understood what the message was. How did Andy determine th
    14·1 answer
  • Ivan wants to have code in a game that will make it possible to change the speed of a swimmer in the game. Which of these does I
    8·1 answer
  • It is where your cpu (processor) is installed
    10·2 answers
  • A type of user interface that features on- screen objects, such a menus and icons, manipulated by a mouse.
    7·1 answer
  • In the context of the data administration component of a database management system (DBMS), the acronym CRUD stands for _____.
    5·1 answer
  • A software copyright?​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!