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
nlexa [21]
3 years ago
5

Create a class named Apartment that holds an apartment number, number of bedrooms, number of baths, and rent amount. Create a co

nstructor that accepts values for each data field. Also create a get method for each field. Write an application that creates at least five Apartment objects
Social Studies
1 answer:
nataly862011 [7]3 years ago
6 0

Create a class named Apartment that holds an apartment number, number of bedrooms, number of baths, and rent amount. Create a constructor that accepts values for each data field. Also create a get method for each field. Application is written in the following way .

Explanation:

Potential Input: 1000, 1, 1

Desired Output:  

Aparment#  Rent   Rooms  Bathrooms

111        1000   1      `1

class Apartments:

    def __init__(self, apartNum, rent, rooms, bath):

       self.apartNum=apartNum

       self.rent=rent

       self.rooms=rooms

       self.bath=bath

    def setRent(self,aRent):

       self.rent1 = aRent

    def getRent(self):

       return self.aRent

    def setRoom(self,rooms):

       self.room = rooms

    def getRoom(self):

       return self.rooms

    def setBath(self,baths):

       self.bath = baths

    def getBath(self):

       return self.baths

apt_1= Apartments(111,1000,1,1)

apt_2= Apartments(112,2000,2,1)

apt_3= Apartments(113,2500,2,2)

apt_4= Apartments(114,3000,3,2)

apt_5= Apartments(115,3500,3,3)

rentInput=input('Enter maximum amount of rent: ')    

roomInput=input('Enter minimum number of bedrooms: ')

bathInput=input('Enter minimum number of baths: ')

You might be interested in
Como se relaciona la cultura con el turismo?
kipiarov [429]
This is suppose to be in the spanish section, repost in the spanish section :) have a nice day
8 0
3 years ago
One criterion of postformal thought proposed by sinnott is
ArbitrLikvidat [17]
Awareness that problems have more than one solution
3 0
4 years ago
Professor Lum asked respondents, "How old are you?" Later in the interview Lum asked,"What is your date of birth?" This illustra
Bumek [7]

Answer:d. reliability.

Explanation:Research reliability refers to the fact that a research method yield stable and consistent outcome.

This means the same method can be used multiple times but still produce the same outcome such as when a professor asks the same question twice but only changing the structure of the question.

7 0
3 years ago
Please help me ASAP!!!!
Bumek [7]
Answer: separation of powers
6 0
3 years ago
(GIVING BRAINLIEST!!)
Softa [21]

Answer:

c

Explanation:

they made check and balances to ensure no one had too much power.

7 0
3 years ago
Read 2 more answers
Other questions:
  • George has refused to continue to teach interpersonal communication because he sometimes has conflicts in his own relationships.
    14·1 answer
  • How does a democracy and a free market economy go well together ? ( one paragraph)
    13·1 answer
  • Much of your sense of self is derived from memories of your unique life experiences. these particular kinds of memories are refe
    9·2 answers
  • Subtle forms of prejudice that coexist with the rejection of racist beliefs are known as
    6·1 answer
  • U.S. recommendations indicate that elementary school students should receive at least ____ minutes of weekly physical education
    5·1 answer
  • How much land did the five civilized tribes give up
    15·1 answer
  • How did a religious tolerance across the Muslim Empires help increase interconnectedness in Afroeurasia?
    9·1 answer
  • What impact did Georgia’s railroads have on economics?
    10·1 answer
  • How does guthi help to maintain social rules in the Newari society?discuss​
    7·1 answer
  • The american people directly elect their senators as a result of:.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!