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

Write the complete class declaration for the class StudentReserve. Include all necessary instance variables and implementations

of its constructor and method(s). The constructor should take a parameter that indicates the number of days in advance that this pass is being reserved. The toString method should include a notation that a student ID is required for this pass. A StudentReserve pass costs half of what that Reserve pass would normally cost. If the pricing scheme for Reserve passes changes, the StudentReserve price should continue to be computed correctly with no code modifications to the StudentReserve class.
Computers and Technology
1 answer:
marissa [1.9K]3 years ago
6 0

Answer:

Explanation:

There is a lot of needed information that is missing in this question including all of the instance variables, what methods are required and what they need to do. The following code is a rough estimate of some of the basic methods and instance variables that are needed based on the information provided in the question.

package sample;

public class StudentReserve {

   public String getName() {

       return name;

   }

   public void setName(String name) {

       this.name = name;

   }

   public String getId() {

       return id;

   }

   public void setId(String id) {

       this.id = id;

   }

   String name, id;

   int studentReservePrice, reservedDays;

   public void StudentReserve(int numOfDays) {

       this.reservedDays = numOfDays;

   }

   public String toString() {

       System.out.println("A Student ID is required");

       return null;

   }

   public int getStudentReservePrice(int regularReservePrice) {

       this.studentReservePrice = regularReservePrice / 2;

       return studentReservePrice;

   }

}

You might be interested in
Stored information about a previous visit to a web site is called information _____.
Nikitich [7]
The answer would be Cookies.
6 0
3 years ago
What are the 3 symbols that can’t be used when saving a document? (From Microsoft Word 2016) (pls helped me!)
Charra [1.4K]

Answer:

\, /, -

Explanation:

The three symbols are forward slash, backward slash, and the hyphen. These were allowed in previous versions of the MS Word. However, since the MS Word 2016 and a little earlier, these three symbols have been banned. And you will immediately get a message if you use these, to correct, and only then the file will be saved with that new name, and that must not have the forward or backward slash or the hyphen.

6 0
4 years ago
How to become a software tester?
HACTEHA [7]
You should look on google to see if there are any websites
5 0
4 years ago
Name two devices that use control knobs to set the level of gadget​
kaheart [24]

Answer:

Control knobs are a simpler type of input hardware and one of the most common components in control systems, and are found on all sorts of devices from taps and gas stoves to optical microscopes, potentiometers and radio tuners.

6 0
3 years ago
The function below takes two numeric parameters. The first parameter specifies the number of hours a person worked and the secon
Triss [41]

Answer:

def calculate_pay(total_worked_hours, rate_per_hour):

   if total_worked_hours > 40:

       return (40 * rate_per_hour) + ((total_worked_hours - 40) * 2 * rate_per_hour)

   else:

       return total_worked_hours * rate_per_hour

Explanation:

  • Create the calculate_pay function that takes 2 parameters.
  • Inside the function check whether the total_worked_hours is greater than 40 and then return the pay by calculating with the help of formula for work over 40 hours.
  • Otherwise return the pay by multiplying the total_worked_hours with rate_per_hour.
6 0
4 years ago
Other questions:
  • Please I need all the help I can get Thank You So Much
    14·1 answer
  • 6.67
    5·1 answer
  • True or False?
    8·1 answer
  • Secure Multipurpose Internet Mail Extensions builds on the encoding format of the MIME protocol and uses digital signatures base
    15·1 answer
  • An EULA usually takes the form of an electronic notification that appears when installing software. The user then has a choice t
    14·1 answer
  • What techniques can be used to assess a product?
    12·2 answers
  • After you have figured out your storyline, what should be the next thing to
    5·2 answers
  • Derek is creating an animation for his class project. What is the first step Derek should follow while creating the animation?
    11·2 answers
  • Which Operating System is used most often in households?
    6·2 answers
  • What is used for risk response control?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!