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]
2 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]2 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
This is a legitimate question if you have a problem then just ignore it. What is the difference between CRVM and SAPX in a progr
g100num [7]

Answer: SAPX is used with Java

Explanation:

4 0
3 years ago
Read 2 more answers
To format an individual sparkline, select the sparkline you want to format, and then click the Ungroup button in the Group group
vichka [17]

Answer:

The answer is "Option a"

Explanation:

A Sparkline is a small graph, which is available inside a sheet, that displays information visually. It displays the information is in the form of patterns on several values. It also uses underline to display the low and high value, use with sparklines, and certain alternatives were wrong, which can be defined as follows:

  • In option b, It is used to define the overall view of data, that's why it is wrong.
  • Option c and Option d both are wrong because, create command is used to create data, or view is used to show that data, they both don't use sparkline option.  
3 0
3 years ago
An object reference provides a(an)______for an object and is used to gain access to the object (Points : 2) entry
sdas [7]

Answer: Instance

Explanation: Instance is the term found in the object-orient programming concept. It is used for the realization of the variation present in any object specifically.The program execution at each time instant is known as the instance of program. Generation of realized instance is known as instantiation.

This helps in the accessing of the object in the program.Other options are incorrect entry , target and handle are not the technical term related with the accessing of object .Thus the correct answer is instance.

3 0
3 years ago
Production cost can be reduced using technology. Explain
Black_prince [1.1K]

Explanation:

By reducing the time the use on unnecessary tasks. And you would be able to operate on using your time on beneficial tasks

3 0
3 years ago
Which column and row references are updated when you copy the formula: =F$5+12?
KIM [24]

Answer:

Column F and row 5

7 0
3 years ago
Other questions:
  • Add is a function that accepts two int parameters and returns their sum.
    8·1 answer
  • The ____ algorithm was the first public key encryption algorithm developed (in 1977 and published for commercial use.
    8·1 answer
  • (Financial application: compound value) Suppose you save $100 each month into a savings account with the annual interest rate 5%
    8·1 answer
  • 1. What are copyright laws? (6 points)
    15·1 answer
  • 6, Answer the following questions.0<br>a What is software?​
    5·1 answer
  • This sensor is used for burglar alarms<br>A. temperature<br>b. humidity<br>c. movement<br>d. PH​
    15·1 answer
  • High level language - An object oriented programming language​
    5·1 answer
  • Create a variable in php to store your university information and parse using jQuery Ajax and print your name. The variable must
    12·1 answer
  • A company creates a ______by using a wireless access point (WAP) and an Internet connection. Select the two correct answers, the
    11·1 answer
  • THIS IS TIMED PLS HURRY UP
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!