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
lys-0071 [83]
3 years ago
10

Person-name: String+setName(String name): void+getName(): String^Student-studentID: long+Student(String sname, long sid)+setID()

: longWhich of these fields or methods are inherited (and accessible) by the Student class?
1. getName(), setName(), name
2. name, getName(), setName(), getID()
3. studentID, name, getName(), setName(), getID()
4. getName(), setName(), toString()
5. None of them
6. getName(), setName(), studentID, getID()
Computers and Technology
1 answer:
ValentinkaMS [17]3 years ago
4 0

Answer and Explanation:

Basically its answer is option 4 where getName(), setName().to String()

let us explained it through  a program where get and set method has been used.

Create  Student class that has marks and grade. Two parameters initialize data member using constructors .Each data member gives values and member function .Show the values of data member.

You can code it in turbo and Dev C++ tool .

# include<iostream.h>

#include<conio.h>

class Student

{

private:

int marks;

String name;

char grade;

public:

Student ( int m , char g)  //get method where it get student marks and grade                                      

{ marks = m ;

grade = g;

}

public void set Name(String a) {

       name = a;

   }

 public String getName() {

       return name;

   }

void set()

{

cout <<"Marks = " <<marks <<endl;

cout<<"Name=" <<name<<endl;

cout <<"Grade = "<< grade <<endl;

}

};

void main ()

{

clrscr();

Student s1(730,'A','ali') s2(621,'B','haider')

cout <<"Recording of student 1 "<<endl;

s1.set();

cout <<"Recording of Student 2:"<<endl;

s2.set();

getch();        

}

for the above program you can see from

//{

cout <<"Marks = " <<marks <<endl;

cout<<"Name=" <<name<<endl;

cout <<"Grade = "<< grade <<endl;

}//

where name marks and grade are inherited from the class Student with get and set methods.But name is take into data type of string because string hold zero ,more letters , space and commas.So it is used to represent the text data.

You might be interested in
In terms of computer networking. what is PING?
Andrew [12]
Ping means how much of a delay there is in your connection. The lower the ping, the smaller the delay. This plays an important role in online gaming. If your ping is 350, then your delay is 350ths of a second.

3 0
3 years ago
​___________ contain microprocessors and tiny antennas that allow them to​ receive, store, and transmit​ data, such as the locat
Gwar [14]

Answer:

The correct option is C: Radio frequency identification tags

Explanation:

Radio frequency identification tags also known as RFID tags involves the use of radio waves to​ receive, store, and transmit​ data which are usually stored on a tag that is attached to an object. A tag contains microprocessors and tiny antennas and whether it is in line of sight or not, it can be tracked and information transmitted from it.

4 0
3 years ago
What is green computing in non-technical term?​
DochEvi [55]

Answer:

Green computing is also known as green information technology (green IT)

4 0
3 years ago
Consumers must learn how to separate the truth from __ techniques
dmitriy555 [2]

Consumers must learn how to separate the truth from deceptive techniques.

Explanation:

Deceptive advertisements are hazardous for both consumer and advertiser. It is a misrepresentation of the nature of products or services promoted falsely by advertisers.

Professionals exploit consumers by following means:

  • false or incomplete information,
  • fraudulent activities
  • deceptive practices.

It may involve -

  • financial theft,
  • health risks,
  • scams, etc.  

Having proper knowledge about such practices and taking legal actions against fraudsters can help claim for the damages incurred.

3 0
4 years ago
PowerPoint provides a wide variety of predefined shapes that can add visual insert to a slide true or false
lozanna [386]
PowerPoint provides a wide variety of shapes for visual inserts this is true
6 0
3 years ago
Read 2 more answers
Other questions:
  • Given that a method receives three parameters a, b, c, of type double, write some code, to be included as part of the method, th
    8·1 answer
  • Write a Java program that will 1. Ask the user to type in a sentence, using a JOptionPane.showInputDialog(). 2. The program will
    10·1 answer
  • 1. Given a sequential list with n numbers, represented in a one-dimensional array A) Write an algorithm to check if the list has
    14·1 answer
  • Write a recursive method called repeat that accepts a string s and an integer n as parameters and that returns s concatenated to
    7·1 answer
  • Type the correct answer in the box.
    11·1 answer
  • What technique is used when setup times at a workstation are sequence dependent?
    15·1 answer
  • Which of the follow efficiencies would be considered unreasonable?
    13·1 answer
  • I still need help, thank you! Will give Brainliest ​
    10·1 answer
  • When you are typing data that is in a series, such as days of the week or months of the year, you can use this tool to complete
    11·1 answer
  • What would be printed to the screen when the following program is run?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!