Here's an example code in Python that meets your assignment's requirements!
class Dwelling:
def __init__(self, dwelling_id, city, state, bedrooms, bathrooms, nightly_rate):
self.id = dwelling_id
self.city = city
self.state = state
self.bedrooms = bedrooms
self.bathrooms = bathrooms
self.nightly_rate = nightly_rate
dwelling1 = Dwelling(1, "Los Angeles", "CA", 4, 2, 300)
dwelling2 = Dwelling(2, "New York", "NY", 3, 1, 245)
dwelling3 = Dwelling(3, "Chicago", "IL", 4, 1, 200)
dwelling4 = Dwelling(4, "Seattle", "WA", 5, 3, 375)
print("Welcome to Book-A-Dwelling!\\")
print("Here are your dwelling options:\\")
print(f"Dwelling {dwelling1.id}")
print(f"Location: {dwelling1.city}, {dwelling1.state}")
print(f"{dwelling1.bedrooms} Bedrooms, {dwelling1.bathrooms} Baths")
print(f"Nightly Rate: ${dwelling1.nightly_rate}\\")
print(f"Dwelling {dwelling2.id}")
print(f"Location: {dwelling2.city}, {dwelling2.state}")
print(f"{dwelling2.bedrooms} Bedrooms, {dwelling2.bathrooms} Baths")
print(f"Nightly Rate: ${dwelling2.nightly_rate}\\")
print(f"Dwelling {dwelling3.id}")
print(f"Location: {dwelling3.city}, {dwelling3.state}")
print(f"{dwelling3.bedrooms} Bedrooms, {dwelling3.bathrooms} Baths")
print(f"Nightly Rate: ${dwelling3.nightly_rate}\\")
print(f"Dwelling {dwelling4.id}")
print(f"Location: {dwelling4.city}, {dwelling4.state}")
print(f"{dwelling4.bedrooms} Bedrooms, {dwelling4.bathrooms} Baths")
print(f"Nightly Rate: ${dwelling4.nightly_rate}\\")
dwelling_choice = int(input("Please select a dwelling number from the list above: "))
num_nights = int(input("\\Excellent choice! How many nights will you stay? "))
if dwelling_choice == 1:
chosen_dwelling = dwelling1
elif dwelling_choice == 2:
chosen_dwelling = dwelling2
elif dwelling_choice == 3:
chosen_dwelling = dwelling3
else:
chosen_dwelling = dwelling4
total_price = chosen_dwelling.nightly_rate * num_nights
print("\\Booking Summary:")
print(f"Dwelling {chosen_dwelling.id}")
print(f"Location: {chosen_dwelling.city}, {chosen_dwelling.state}")
print(f"{chosen_dwelling.bedrooms} Bedrooms, {chosen_dwelling.bathrooms} Baths")
print(f"Nightly Rate: ${chosen_dwelling.nightly_rate}\\")
print(f"Staying for {num_nights} nights\\")
print(f"Base price of your stay: ${total_price}")
(This program defines a Dwelling class with the given member variables, and creates four objects with the given information using the pseudo-constructor. The program then displays the list of dwelling options to the user and prompts them to select a dwelling and enter the number of nights they will stay. The program calculates the base price of the stay and displays a summary of the user's selection and the calculated base price.)