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
Alice is watching a speech over the internet. what type of message is alice attending to?
Vilka [71]

The  type of message is allice attending on the internet is known to be called a mediated message.

<h3>What is a mediated message?</h3>

Mediated communication is known to be a term that is often called a mediated interaction or a mediated discourse.

It is seen as a term that connote the act of  communication done by the use of information communication technology and can be different from face-to-face talking.

Hence, The  type of message is allice attending on the internet is known to be called a mediated message.

Learn more about web message from

brainly.com/question/28206700

#SPJ1

4 0
1 year ago
What is working with others to find a mutually agreeable outcome?
Arturiano [62]

Answer:

its B. negotiation

Explanation:

1. I got it right on the exam :)

2. negotiation resolves in problem solving. you work together with others to solve problems, together which is negotiating/ talking things through to figure out an answer/ outcome.

Hope this helps! :))

Have an awesome day!!

3 0
3 years ago
What is used to accurately position objects on the slide using a single horizontal and vertical line that intersects in the cent
oksian1 [2.3K]

Answer: Grids are a set of static horizontal and vertical lines with several intersection points that appear when you enable them on the slide. They can be used to accurately place or position the objects to bring out the visual feel on a slide.

8 0
3 years ago
Read 2 more answers
How does kinetic energy affect the stopping distance of a small vehicle compared to a large vehicle?
Arisa [49]
I hope this helps you, if it does please give me brainist answer =D

3 0
3 years ago
Read 2 more answers
Question 7 Consider the following code:
zhannawk [14.2K]

Answer:

Melon

Explanation:

The variable "list" containts a function that returns a price that is greater than or equal to 60.0.

In the variable "fruit", the only item in the array with a price attribute set above that number is the string Melon.

3 0
2 years ago
Other questions:
  • Select three examples of cryptographs. Security tokens Shared-key Malware Firewalls Message authentication code Public-key
    7·2 answers
  • Peak download rate for a 4g network is __________. select one:
    12·2 answers
  • How do you know if your phone has a virus?
    13·1 answer
  • Why is plastic durable?
    9·2 answers
  • What percentage of business are using social media today
    14·1 answer
  • in java Write a program with total change amount in pennies as an integer input, and output the change using the fewest coins, o
    13·1 answer
  • Select three physical forms of storage. USB drive Primary cache Magnetic storage Secondary cache Dynamic RAM Optical drive
    7·2 answers
  • What is an advantage of storing data in a Data Lake, without applying a specific schema to it initially?
    10·1 answer
  • These brainly bots need to stop!!
    14·1 answer
  • Explain why you would use the soft on/off jumper when working on ATX system
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!