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]
3 years ago
10

Classes cannot:

Computers and Technology
1 answer:
dexar [7]3 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 method called classSplit that accepts a file scanner as input. The data in the file represents a series of names and gra
Lelu [443]

Answer:

public static void classSplit(Scanner file){

   int studentsOf21 = 0, studentsOf22 = 0,studentsOf23 = 0, studentsOf24 = 0;

   while (file.hasNext() == true){

       String studentName = file.next();

       int year = file.nextInt();

       switch (year){

           case 2021:

               studentsOf21++;

               break;

           case 2022:

               studentsOf22++;

               break;

           case 2023:

               studentsOf23++;

               break;

           case 2024:

               studentsOf24++;

               break;

       }

   }

   int totalGraduate = studentsOf21+studentsOf22+studentsOf23+studentsOf24;

   System.out.printf("students in class of 2021: %.2f%n", students2021*100.0/totalGraduate);

   System.out.printf("students in class of 2022: %.2f%n", students2022*100.0/totalGraduate);

   System.out.printf("students in class of 2023: %.2f%n", students2023*100.0/totalGraduate);  

   System.out.printf("students in class of 2024: %.2f%n", students2024*100.0/totalGraduate);

}

Explanation:

The classSplit method of the java class accepts a scanner object, split the object by iterating over it to get the text (for names of students) and integer numbers (for graduation year). It does not need a return statement to ask it prints out the percentage of graduates from 2021 to 2024.

4 0
3 years ago
Identify the different groups of keys on a keyboard
kifflom [539]

Answer:alphabetic keys, numeric keys, function keys and special keys.

Explanation:

6 0
3 years ago
The giant eniac stores how much size memory
swat32

if you mean the giant eniac stores how much memory, the answer would be that the original model had no storage but later a 100-word storage core was installed

3 0
3 years ago
The HATCH command is found on which panel to the Home tab to the AutoCAB ribbon?
Agata [3.3K]

The answer is B) Draw


3 0
3 years ago
How to add up multiple user inputs for example: If i ask the user How many numbers do you want to add? they say 5 then i out put
Morgarella [4.7K]

Answer:

import java.util.Scanner;

class Main {

 public static void main(String[] args) {

   Scanner scanner = new Scanner(System.in);

   System.out.println("How many numbers do you want to add?");

   int numberOfNumbers = scanner.nextInt();

   int arrayNumbers[] = new int[numberOfNumbers];

   System.out.println("Enter " + numberOfNumbers + " numbers:\n");

   for(int i = 0; i < numberOfNumbers; i++){

     int addToArray = scanner.nextInt();

     arrayNumbers[i] = addToArray;

   }

   int sum = 0;

   for(int j = 0; j < arrayNumbers.length; j++){

     sum+=arrayNumbers[j];

   }

   System.out.println("Sum: " + sum);

 }

}

Explanation:

6 0
2 years ago
Other questions:
  • A network technician cannot get a host to connect to the internet. running the ping command shows the apipa ip address. what is
    6·1 answer
  • The protocol that enables computers on the Internet to communicate with one another is called _____.
    10·2 answers
  • What is the meaning of HDMI?
    5·2 answers
  • Olivia creates a personal budget. She enters her current savings account balance in cell D3. In cell A3, she calculates her inco
    8·1 answer
  • Which type of chart is used to chart progress over time?
    10·1 answer
  • Under what circumstances does a multithreaded solution using multiple kernel threads provide better performance than a single-th
    6·1 answer
  • . List 5 types of exploits from cybercrime and provide brief definition. (2.5 Marks)
    5·1 answer
  • The _____ option will require users to have a password to access the document.
    10·2 answers
  • If you want to join all of the rows in the first table of a SELECT statement with just the matched rows in a second table, you u
    10·1 answer
  • How can ICTs be used in the workplace to improve the way employees
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!