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
Georgia [21]
2 years ago
13

Create a class named Lease with fields that hold an apartment tenant’s name, apartment number, monthly rent amount, and term of

the lease in months. Include a constructor that initializes the name to "XXX", the apartment number to 0, the rent to 1000, and the term to 12. Also include methods to get and set each of the fields. Include a nonstatic method named addPetFee() that adds $10 to the monthly rent value and calls a static method named explainPetPolicy() that explains the pet fee. Save the class as Lease.java.
Computers and Technology
1 answer:
natka813 [3]2 years ago
6 0

Answer:

package b4;

public class Lease {

// Declare the necessary instance fields

String tenant_name;

int appartment_number;

double rent_amount;

double lease_term;

// Constructor to initialize the fields to the requested values

public Lease() {

 this.tenant_name = "XXX";

 this.appartment_number = 0;

 this.rent_amount = 1000;

 this.lease_term = 12;

}

// Getter for tenant name

public String getTenant_name() {

 return tenant_name;

}

// Setter for tenant name

public void setTenant_name(String tenant_name) {

 this.tenant_name = tenant_name;

}

// Getter for appartment number

public int getAppartment_number() {

 return appartment_number;

}

// Setter for appartment number

public void setAppartment_number(int appartment_number) {

 this.appartment_number = appartment_number;

}

// Getter for rent amount per month

public double getRent_amount() {

 return rent_amount;

}

// Setter for rent amount per month

public void setRent_amount(double rent_amount) {

 this.rent_amount = rent_amount;

}

// Getter for lease term

public double getLease_term() {

 return lease_term;

}

// Setter for lease term

public void setLease_term(double lease_term) {

 this.lease_term = lease_term;

}

// Non-static method addPetFee

// It adds $10 to the current rent_amount.

// It also calls the static explainPetPolicy method

public void addPetFee() {

 this.rent_amount += 10;

 explainPetPolicy();

}

// The Static explainPetPolicy method

// Please replace the string in the println() method with the actual policy

// statement

public static void explainPetPolicy() {

 System.out.println("Explanation of the pet policy is as follows");

}

}

Explanation:

The actual source code file has been attached to this response. The code has been well commented to aid readability and understandability. Please download the file attached. It has been saved as "Lease.java"

Download java
You might be interested in
Write a program that accepts two numbers R and H, from Command Argument List (feed to the main method). R is the radius of the w
nasty-shy [4]

Answer:

Answered below.

Explanation:

#Answer is written in Python programming language

#Get inputs

radius = float(input("Enter radius in inches: "))

height = float(input("Enter height in feet: "))

#Convert height in feet to height in inches

height_in_inches = height * 12

#calculate volume in cubic inches

volume = 3.14 * (radius**2) * height_to_inches

#convert volume in cubic inches to volume in gallons

volume_in_gallons = volume * 0.00433

#output result

print (volume_in_gallons)

7 0
2 years ago
4. What is the connection between productivity and Microsoft Office/ Office 365?
ikadub [295]
Microsoft 365 plans for home and personal include the robust Office desktop apps that you're familiar with, like Word, PowerPoint, and Excel. ... Office 2019 is sold as a one-time purchase, which means you pay a single, up-front cost to get Office apps for one computer.

Hope this helps :)
3 0
2 years ago
Most of the Desktop games contain a backdoor used to test and update the game.
sveta [45]

A backdoor is a typically covert method of bypassing normal authentication or encryption in a computer, product, embedded device (e.g. a home router), or its embodiment (e.g. part of a cryptosystem, algorithm, chipset, or even a "homunculus computer" —a tiny computer-within-a-computer such as that found in Intel's AMT technology).Backdoors are most often used for securing remote access to a computer, or obtaining access to plaintext in cryptographic systems. From there it may be used to gain access to privileged information like passwords, corrupt or delete data on hard drives, or transfer information within autoschediastic networks.

the answer is True

i hope it will help you

8 0
3 years ago
A series circuit and identify how voltage is split up by each load in the circuit?
Vlada [557]

The same current flows through each part of a series circuit. The total resistance of a series circuit is equal to the sum of individual resistances. ... The voltage drop across a resistor in a series circuit is directly proportional to the size of the resistor. If the circuit is broken at any point, no current will flow.

4 0
2 years ago
A hidden backlog contains the projects that the IT department is not aware of because of low feasibility.
Finger [1]

Answer: True

Explanation:

Yes, the given statement is true that the due to the very low feasibility the IT (Information technology) department are not aware of the hidden backlog that basically contain projects.

The feasibility is the main factor in the IT department as it helps to study whole objective of the project and then also uncover all the strength and weakness of the project so that we can easily go through the details to make the project more efficient and reliable.

8 0
3 years ago
Other questions:
  • Websites using www showed up on the internet for the first time in -992
    9·1 answer
  • Consider a multiprocessor CPU scheduling policy. There are 2 options: 1) a singlecommon ready queue of jobs; when a CPU becomes
    8·1 answer
  • Your grandmother was an established artist and left you several original paintings after she died. Which of these statements is
    6·1 answer
  • A palindrome is a word or phrase that reads the same both backward and forward. The word ""racecar"" is an example. Create an al
    15·1 answer
  • In a car crash, wearing a seat belt __________________.
    5·2 answers
  • Which type of appliance can host several functions, such as antimalware, firewall, content filter, and proxy server
    11·1 answer
  • What are 3 similarities and 3 differences between live theatre and film/videos -Drama Class
    13·1 answer
  • With SQL, how do you select all the columns from a table named "Persons"?
    8·1 answer
  • What complications are imposed if one tries to implement a dynamic list using a traditional one-dimensional array
    14·1 answer
  • To read encrypted data, the recipient must decipher it into a readable form. What is the term for this process?.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!