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
Which of the following are screen objects used to maintain, view, and print data from a database
amid [387]

Answer:

The correct answer to the following question will be "A spreadsheet".

Explanation:

  • A spreadsheet is a software device used to access and stores data from such a database. The interaction between separate entities (in separate tables) is controlled by their specific columns.
  • It's a programming program for arranging, evaluating and storing data in tabular format.
  • The spreadsheets have been developed as computer-controlled analogs to paper reporting worksheets. The system runs on data decided to enter in table cells.

Therefore, a Spreadsheet is the right answer.

8 0
3 years ago
Please, give me a comic or story idea. I will mark brainliest. ( i need 5 slides with 2 characters in the story or comic) Please
salantis [7]

Answer:

Jack and John

Explanation:

Jack called John and offered him to come with him and some other friends to go out to the mall.

.....

8 0
3 years ago
Read 2 more answers
The same student is curious about how a Web site appears on his computer screen. On a separate piece of paper, draw and explain
Ksivusya [100]

Answer:

HTTP is the application layer protocol required.

Explanation:

For a web page to be displayed on a browser, the seven layers of the OSI model work together. On the application layer, HTTP protocol is used to communicate between the server and the client. The HTTP client is the browser (Chrome, Internet Explorer, Firefox etc.) which sends a request to the HTTP server for accessing a web page.  

When a URL is accessed, the HTTP client sends a request to the HTTP server. The server locates the file which is being requested and sends a response message containing the web page which is to be displayed. The exchange of data between the HTTP client and server takes place over a TCP connection.

TCP is a transport layer protocol which provides a reliable connection over which the exchange of data takes place. Data at the transport layer is sent in the form of segments. If the data being sent from the server is too long, it is divided into multiple segments and sent one after the other. The client is then responsible for joining the segments and displaying the information as a web page. The transport layer is also responsible for error correction and detection during the communication process.

If the student is sending or retrieving information from a secure website, the messages being exchanged between the client and server will be encrypted. This means that if a third-party tries to tap the communication process, they would not be able to decipher the messages. This increases the security and helps keep the information present on the web page confidential.

8 0
3 years ago
What is the most common form of renewable energy used to generate electricity
sertanlavr [38]

i think that it’s either sunlight or solar energy

6 0
3 years ago
Normalize the following relation:
lora16 [44]

Answer:

Hi Riahroo! This is a good question on the concept of relational databases.

We can normalize the relations as follows:

Flight

(flightnumber (unique), flighttime, airline_id, departure_city, arrival_city,  passenger_id, pilot_id, airplane_id)

has_one_and_belongs_to :airline

has_many :passengers

has_one :pilot

Itinerary(passenger_id, flight_id)

Belongs_to  

Passenger_details  

(passengername (unique), gender, date_of_birth)

has_many :flights

Pilot

(pilotname (unique), gender, date_of_birth)

has_many :flights

airline(airlinename)

airplane(planeID, type, seats))

Explanation:

To normalize a relation, we have to remove any redundancies from the relationships between database objects/tables and simplify the structure. This also means simplifying many-to-many relationships. In this question, we see there is a many-to-many relationship between flights and passengers. To resolve this we can introduce a join table which simplifies this relationship to a one-to-many between the objects.  

5 0
3 years ago
Other questions:
  • most dialog boxes in windows programs requiring navigation follow a similar procedure. true or false.
    7·1 answer
  • An effectively distributed resume will get an interview
    12·2 answers
  • Given the following method definitions: void mystery(double a) { System.out.print("double! "); } void mystery(int a) { System.ou
    12·1 answer
  • What is a Photojournalist
    5·1 answer
  • The relational database is the primary method for organizing and maintaining data today in information systems. It organizes dat
    9·1 answer
  • When searching for an image on your computer, you should look for a file with which of the following extensions?
    8·1 answer
  • What is ana absolute adress
    11·1 answer
  • Think about the five steps to writing an algorithm. Why is each step necessary?
    6·2 answers
  • 100 POINTS. DO NOT SPAM. OR I WILL REPORT.
    13·2 answers
  • A _ is the acknowledgment of a potential noncomformity, or an opinion regarding an issue that is not covered by a standard
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!