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

Insert XXX to output the student's ID. public class Student { private double myGPA; private int myID; public getID) { return myI

D; public static void main(String [] args) { Student s = new Studento; XXX System.out.println("Student ID: "); System.out.println("Student ID:" + getID()); System.out.println("Student ID:" + s.getId()); System.out.println("Student ID:" + student.getID()); A static main() _ has direct access to class instance members can declare and create objects can call instance methods without an object O can not be included within a programmer-defined class What is stored in score1, score2, and grade? Integer scorel = 72; int score2 = 85; Character grade = 'C'; obj reference, 85, obj reference 72,85, obj reference, obj reference, obj reference obj reference, obj reference, Which is true? Instances of programmer-defined objects are immutable Contents of a Double instance can be modified after initialization An instance of String stores data rather than an object reference Reference variables store memory locations
Computers and Technology
1 answer:
Aleonysh [2.5K]3 years ago
7 0

Answer:

Explanation:

The question above is missing many details and are actually various questions in one. I will answer each one seperately below...

A. The piece of code to get the ID in this code snippet that needs to replace XXX would be the following ... System.out.println("Student ID: " + s.getID());

B. A static main() can declare and create objects. Once these objects are created their instance methods can then be called.

C. Integer score1 = 72;

    int score2 = 85;

    Character grade = 'C';

     In the above code snippet, the information stored in score1, score2, and grade are the following... obj reference, 85, obj reference. This is becasue both Integer and Character are classes and the values being passed to their variables are referencing that object class, while score2 is a primitive type of int and is therefore simply a number.

D. The statement that is true is ... Contents of a Double instance can be modified after initialization. Objects can be modified by calling its setter methods after initializing it.

You might be interested in
An array is sorted (in ascending order) if each element of the array is less than or equal to the next element .
Aleks04 [339]

Answer:

// The program below checks if an array is sorted or not

// Program is written in C++ Programming Language.

// Comments are used for explanatory purpose

//Program Starts here

#include<iostream>

using namespace std;

//Function to check if the array is sorted starts here

int isSorted(int arr[], int count)

{

// Check if arrays has one or no elements

if (count == 1 || count == 0) {

return 1;

}

else

{

// Check first two elements

if(arr[0] >= arr[1])

{

return 0; // Not sorted

}

else

{ // Check other elements

int check = 0;

for(int I = 1; I<count; I++){

if (arr[I-1] > arr[I]) { // Equal number are allowed

check++; // Not sorted

}

}

}

if(check==0)

return isSorted(arr, count - 1); //Sorted

else

return 0; // Not sorted

}

// Main Method starts here

int main()

{

int count;

cin<<count;

int arr[count];

for(int I = 1; I<=count; I++)

{

cin>>arr[I-1];

}

int n = sizeof(arr) / sizeof(arr[0]);

if (isSorted(arr, n))

cout << "Array is sorted";

else

cout << "Array is not sorted";

}

8 0
3 years ago
A new computer virus can enter the system through email or through the internet. There is a 30 % chance of receiving this virus
SpyIntel [72]

Answer:

form 0% to 50%

Explanation:

6 0
3 years ago
Which of the following is not ways to fix software in windows 8
RideAnS [48]
Well, this is pretty tricky so lets define all the purposes of these

Safe mode - troubleshoots windows ; determines HARDWARE malfunctions

Check device manager - Highlights malfunctioning hardware that is connected to the P.C.

Refreshing pc - practically nothing

resetting your pc - removes all programs, files, etc. and starts as a new Windows.

I will have to go with answer C.) Refresh your P.C.
7 0
3 years ago
Match the network topology to its description. 1. bus data is certain to reach its destination 2. mesh no danger of data collisi
Ilya [14]

Answer:

3,1,2

Explanation:

6 0
3 years ago
Which type of computer graphic can be resized without affecting image quality or getting distorted?
BartSMP [9]
Vector graphics can be rescaled without losing quality and each property can be changed like the colour, shape and size. 

Even if an object in a vector large, it doesn't need a lot of memory. Hence, the file size of a vector graphic is often very small.


8 0
3 years ago
Other questions:
  • Plato :
    14·2 answers
  • Consider a multiprocessor CPU scheduling policy. There are 2 options: 1) a singlecommon ready queue of jobs; when a CPU becomes
    8·1 answer
  • Which forensics tool would you use to reveal recent pages viewed via the internet explorer browser?
    10·1 answer
  • Which of the following is a disadvantage of using face-to-face communication over other communication channels? A) There is lag
    13·1 answer
  • Two routers connect with a serial link, each using its S0/0/0 interface. The link is currently working using PPP. The network en
    6·1 answer
  • Where do you define parameter variables?
    14·1 answer
  • Draw a datapath that can perform the following set of register replacement and combinational operations. Assume all registers ar
    5·1 answer
  • List three ways of breaking a copyright law with the illegal copy of software.​
    11·1 answer
  • Choose the missing method name.
    7·1 answer
  • Please Answer ASAP!!
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!