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
PlanthelogicforLungi’sapplicationusingpseudocode.Thelogicneedstosatisfythefollowingneeds:TheapplicationwillneedtoallowLungitoen
anastassius [24]
According to my
calculations is 3
6 0
1 year ago
You use lpstat and determine that a user named User1 has placed two large print jobs in the queue for Printer1 that have yet to
ICE Princess25 [194]

A command that should be used to remove these two print jobs from the print queue is cancel Printer1-17 Printer1-21.

<h3>What is printing?</h3>

Printing can be defined as a process that typically involves sending print jobs from a computer system to a printer, especially through the print queue.

In Computer technology, "cancel Printer1-17 Printer1-21" is a command that should be used to remove the two (2) print jobs from the print queue of Printer1 which is yet to start printing.

Read more on printer here: brainly.com/question/17100575

#SPJ1

6 0
2 years ago
2. How is accessing the Internet through a home network and public Wi-Fi similar?​
Romashka-Z-Leto [24]

Answer: it is not the same

Explanation: via public wi-fi u can easily be hacked but your home wi-fi is yours and u are safe there

6 0
3 years ago
What is generation of computer ?​
mestny [16]

I HOPE THIS INFORMATION WILL HELP YOU A LOT......

3 0
3 years ago
Read 2 more answers
Rosanna is a middle school teacher. She has installed a spreadsheet program in her computer that tracks the grades and attendanc
Lana71 [14]

The computer software that should be installed on Rosanna's computer is application software.

The information regarding the application software is as follows:

  • It is the software where the activity is to be performed.
  • The example like a spreadsheet software, presentation software, database software, etc.

Therefore we can conclude that the computer software that should be installed on Rosanna's computer is application software.

Learn more about the software here: brainly.com/question/1022352

8 0
3 years ago
Other questions:
  • Consider the following classes:
    8·1 answer
  • Dell Computer purchases parts and resources for its computers from multiple suppliers that are spread across the world. This pra
    8·1 answer
  • What term is used to describe a function that uses an algorithm to convert an input of letters and numbers into an encrypted out
    9·1 answer
  • A network protocol is a set of rules defining communication between two devices. True False
    8·2 answers
  • To remove text from a specific location and keep it to use again, you should select ___
    6·1 answer
  • Why is the answer B?
    6·1 answer
  • write a script that creates and calls a stored procedure named insert_category. first, code a statement that creates a procedure
    10·1 answer
  • You are tasked with leading a project to build a custom software testing tool for client. You have been provided with a set of p
    7·1 answer
  • Why is drive of value when pursuing a career in IT?
    14·1 answer
  • What is the remainder obtained by dividing x 7 + x 5 + 1 by the generator polynomial x 3 + 1?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!