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
bagirrra123 [75]
3 years ago
15

he superclass Student contains: a constructor that accepts a String corresponding to the name of the school the student attends

a toString method that returns 'student at X' where X is the name of the school the student attends. Write a public subclass HighSchoolStudent, based on Student, which contains: a constructor accepting a String which is used as a parameter to the superclass constructor a toString method that returns 'high school student at X'. This method must use the toString method of its superclass.
Computers and Technology
1 answer:
natita [175]3 years ago
3 0

Solution :

public $\text{class}$ Student {

$\text{protected String}$ school$;$

public $\text{Student}$(String school) {

$\text{this.school}$ = school;

}

public String $\text{toString}()$ {

return $\text{"student at"}$ + school;

}

}

HighSchool$\text{Student.java}$ :

public class $\text{HighSchoolStudent}$ extends Student {

public $\text{HighSchoolStudent}$(String school) {

super$\text{(school)}$;

}

public String $\text{toString}()$ {

return $\text{"high school"}$ + super.$\text{toString}()$;

}

}

You might be interested in
Please, ignore
Komok [63]
Abhheoorioooooohhhhh omg
3 0
3 years ago
Read 2 more answers
You are asked to provide a list of security groups a user is a member of. You write a script to pull the data from Active Direct
Whitepunk [10]

Answer:

I have no clue. I wish I could help though.

Explanation:

Sorry

7 0
3 years ago
PLS HELP MEE!!!
kramer

Answer:

starting with lowercase letters, using uppercase letters for the first letter in a new word

Explanation:

starting with a dollar sign, using lowercase for the remaining parts of each word

4 0
3 years ago
Isabel received a message on her computer that appeared to be from the FBI. It informed her that her computer has been locked an
Strike441 [17]

Answer:

Option C is the correct option.

Explanation:

When any email or message is received from the FBI in the user's computer system and the following message is about the user's computer system has been locked and they demand some amount to unlock their data or information.

So, the following scenario is about the ransomware because they ransom money to retrieve their data and information from the system.

5 0
3 years ago
Find the solution of the equation<br>4x+10/3=25?3-x ​
fgiga [73]
I’m going to assume the ? is dividing and if that’s the case X = 1
8 0
3 years ago
Other questions:
  • In a case where electrical current leakage from the circuit occurs,
    7·2 answers
  • What term refers to a piece of software that interfaces with the hardware on your computer?
    10·2 answers
  • Suppose a worker needs to process 100 items. the time to process each item is exponentially distributed with a mean of 2 minutes
    5·1 answer
  • An application is to be written that would allow students to find out their GPA(double) and their total number of credits (an in
    15·1 answer
  • An individual who understands and uses a variety of symbols yet uses one symbol at a time to share a message needs more developm
    10·1 answer
  • 2. From the listing code, please give the block of line numbers for code which are concerned with the following: A) Main functio
    5·1 answer
  • For a typical middle-income family, what is the estimated cost of raising a child to the age of 18?
    11·1 answer
  • What keyboard functions lets you delete words
    9·2 answers
  • Unconformities develop when new sedimentary layers accumulate atop old, eroded layers, resulting in a geologic hiatus. Which of
    9·1 answer
  • HELP!!!
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!