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
Counting calculus students. About A university offers 3 calculus classes: Math 2A, 2B and 2C. In both parts, you are given data
OleMash [197]

Answer:

Part (a) n(A∩B∩C) = 4

Part (b) n(A∪B∪C) = 54

Explanation:

n(A) = no. of students who took Math 2A

n(B) = no. of students who took Math 2B

n(C) = no. of students who took Math 2C

n(A∩B) = no. of students who took both Math 2A and 2B

n(A∩C) = no. of students who took both Math 2A and 2C

n(B∩C) = no. of students who took both Math 2B and 2C

n(A∩B∩C) = no. of students who took all three Math 2A, 2B and 2C

n(A∪B∪C) = no. of total students in a group

∩ represents Intersection and ∪ represents Union

Part (a)

n(A∪B∪C) = n(A) + n(B) + n(C) - n(A∩B) - n(A∩C) - n(B∩C) + n(A∩B∩C)  

Where n(A∩B∩C) represents the number of students who took all three classes and n(A∪B∪C) represents the total number of students in group A

157 = 51 + 80 + 70 - 15 - 20 - 13 + n(A∩B∩C)

Re-arranging the equation to solve for n(A∩B∩C) since we want to find out those students who took all three classes

n(A∩B∩C) = 157 - 51 - 80 - 70 + 15 + 20 + 13

n(A∩B∩C) = 4

So there are 4 students in group A who took all three classes

Part (b)

n(A∪B∪C) = n(A) + n(B) + n(C) - n(A∩B) - n(A∩C) - n(B∩C) + n(A∩B∩C)

This time we are given n(A∩B∩C) students who took all three classes and want to find n(A∪B∪C) that is total number of students

n(A∪B∪C) = 28 + 28 + 25 - 11 - 9 - 10 + 3

n(A∪B∪C) = 54

So there are total 54 students in group B

8 0
3 years ago
A/an ________is a device used to protect computers against surges and spikes in power.
givi [52]

Answer:

1. Surge protector.

2. Power-saving mode.

3. Hardware and software.

4. Hard disk.

5. Eject.

Explanation:

1. A surge protector is a device used to protect computers against surges and spikes in power.

2. Sleep and Hibernate are examples of Power-saving modes.

3. Regular maintenance on a computer is good for both hardware and software.

4. Bad sectors are sections of the hard disk that are physically damaged.

5. To protect some devices such as flash drives and external hard drives from corruption, it is best to eject the devices.

7 0
3 years ago
Never mind I got it
sergiy2304 [10]
<span>She is estimating the future profits with an estimate of long-term sales and the actual cost incurred.</span>
5 0
3 years ago
Read 2 more answers
If i'm watching a show on netflix without any extra speakers besides the normal one on my tv, what setting should i use? English
sweet-ann [11.9K]
5.1 is higher quality
8 0
3 years ago
Read 2 more answers
For smaller business and home networks, which of the following allows multiple computers to share a single broadband Internet co
olasank [31]

Answer:

cable modem

Explanation:

Just a cable modem is enough.

7 0
4 years ago
Other questions:
  • A news website uses 32-bit integers to count the number of times an article has been viewed. The website is becoming more popula
    10·1 answer
  • Click _______ to view each individual record of a mail merge document.
    5·2 answers
  • Which trait depicts honesty?
    10·1 answer
  • Why are agorithms important?
    8·1 answer
  • Pick the simplest line of code to test if the word "BASIC" is stored in the variable text1.
    12·1 answer
  • In the Mouse Properties window, you can?
    8·1 answer
  • The digital EGR valve used on GM 3800 engines allows for how many different EGR flow rates?
    15·1 answer
  • 1
    5·2 answers
  • Range paramters - for loop<br> question in picture
    13·1 answer
  • Jacob holds a Computer Hacking Forensic Investigator (CHFI) certification. Which of the following responsibilities should Jacob
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!