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
Gelneren [198K]
3 years ago
12

Which XXX declares a student's name. public class Student { XXX private double myGPA; private int myID; public int getID() { ret

urn myID; } } Group of answer choices String myName; public String myName; private myName; private String myName;
Computers and Technology
1 answer:
maw [93]3 years ago
4 0
<h2>Question:</h2>

<em>Which XXX declares a student's name. </em>

public class Student {

   XXX

   private double myGPA;  

   private int myID;

   public int getID() {

        return myID;

   }

}

<em>Group of answer choices </em>

a. String myName;

b. public String myName;

c. private myName;

d. private String myName;

<h2>Answer:</h2>

private String myName;

<h2>Explanation:</h2>

To declare a student's name, the following should be noted.

i. The name of the student is of type <em>String</em>

ii. Since all of the instance variables (myGPA and myID) have a <em>private</em> access modifier, then myName (which is the variable name used to declare the student's name) should be no exception. In other words, the student's name should also have a <em>private</em> access.

Therefore, XXX which declares a student's name should be written as

<em>private String myName;</em>

<em></em>

Option (a) would have been a correct option if it had the <em>private</em> keyword

Option (b) is not the correct option because it has a <em>public</em> access rather than a <em>private</em> access.

Option (c) is not a valid syntax since, although it has a <em>private</em> access, the data type of the variable <em>myName</em> is not specified.

Option (d) is the correct option.

You might be interested in
Original list:0,0,0,0,0,0,0,0
xxTIMURxx [149]

Answer:

as same 0,0,0,0,0,0,0,0

4 0
3 years ago
Design by contract considers the software system to be a setof:
Ludmilka [50]

Answer: A) clients and servers

Explanation:

 Design by contract considers the software system to be a set of Clients and server as, the contract designing is the contract software programming approached for making the effective system software. This type of approach are consider that all the components of the clients that are instance of an operation on the components of the server, which can fulfill the precondition specific requirements which including in that operations.

5 0
3 years ago
19. Which network topology is a combination of two or more types of physical or two or more types of logical topologies? A. Poin
marishachu [46]

Answer:b)-Hybrid topology

Explanation:

Hybrid is a type of topology which uses different types of topology. Hybrid topology uses the mix of ring, bus, mesh, star and tree topology. This topology is reliable as troubleshooting is easy without affecting other networks. Also, more network can be easily added to it without causing much interference.

The major disadvantage of hybrid topology is its complexity.

4 0
3 years ago
The principal objectives of computer security are to prevent unauthorized users from gaining access to resources, to prevent leg
Lena [83]

Answer:

True is the correct Answer for the above question.

Explanation:

  • Computer security is a security in which data of the computer is secured from the access of unauthorized users. It is primarily achieved to stop the access grant to the unauthorized user.
  • It means that there is an authorization point which decides that the user is authorized or not. If the user is authorized then only he can enter the system otherwise he can not able to enter the system.
  • It helps to secure the data and the data is the important point of the computer system.
  • The question also states the same which is described above. Hence true is the correct answer.

3 0
3 years ago
Write an if/else statement that compares the double variable pH with 7.0 and makes the following assignments to the int variable
Brilliant_brown [7]

Answer:

int main()

{

   double pH;

   int neutral;

   int base;

   int acid;

   cout<<"Enter a pH Value";

   cin>> pH;

   if(pH<7.0){

       neutral =0;

       base=0;

       acid= 1;

   }

   else if (pH=7.0){

       neutral =1;

       base=0;

       acid= 0;

   }

   else{

       neutral =0;

       base=1;

       acid= 0;

   }

   cout <<"The neutral, Base and Acid Values are: "<<neutral<<","<<base<<","<<acid<<" Respectively"<<endl;

   return 0;

}

Explanation:

Using multiple if/elseif/else statement the following problem is solved with C++

4 0
3 years ago
Other questions:
  • James was having coffee and overhead a conversation between two men who talked about the fact that their friend could not find a
    10·1 answer
  • Which best describes a VPN?
    14·2 answers
  • This solution will use an item quantity and a state code to calculate the total price of an item. The solution will calculate th
    10·1 answer
  • Count characters Write a program whose input is a string which contains a character and a phrase, and whose output indicates the
    6·1 answer
  • When working with copper cabling (as opposed to fiber optic) a ________ can check a variety of a cable's electrical characterist
    13·1 answer
  • A question to determine your ability to use the reference materials effectively. Your boss has determined that you will be using
    9·1 answer
  • Kirsten manages the infrastructure that hosts her company's CRM platform. She currently has a production environment that all of
    5·1 answer
  • Which of the following shows the assignment of a string to a variable? Select 3 options.
    11·2 answers
  • 1.Blocul care asigura impedanta necesara la intrarea aparatului de masurat numeric este:
    13·1 answer
  • Wml script is used in? ​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!