diff --git a/Summer-2024/CS-3443/Labs/Lab3/.gitignore b/Summer-2024/CS-3443/Labs/Lab3/.gitignore new file mode 100644 index 0000000..f7ff4f7 --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/.gitignore @@ -0,0 +1,18 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.idea +.project +.settings +.externalNativeBuild +.cxx +local.properties diff --git a/Summer-2024/CS-3443/Labs/Lab3/Layout.puml b/Summer-2024/CS-3443/Labs/Lab3/Layout.puml new file mode 100644 index 0000000..872b461 --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/Layout.puml @@ -0,0 +1,70 @@ +@startuml +skinparam classAttributeIconSize 0 +abstract class Property { + -id: String + -address: String + -price: String + +<> Property(id: String, address: String, price: String) + +toString(): String + +setId(newId: String) + +getId(): String + +setAddress(newAddress: String) + +getAddress(): String + +setPrice(price: String) + +getPrice(): String +} + +skinparam classAttributeIconSize 0 +class CommercialProperty { + -id: String + -address: String + -price: String + -zone: String + -units: Integer + -parkingSpots: Integer + +<> CommercialProperty(id: String, address: String, price: String, zone: String, units: Integer, parkingSpots: Integer) + +setZone(newZone: String) + +getZone(): String + +setUnits(newUnits: Integer) + +getUnits(): Integer + +setParkingSpots(newParkingSpots: Integer) + +getParkingSpots(): Integer +} + +skinparam classAttributeIconSize 0 +class ResidentialProperty { + -id: String + -address: String + -price: String + -hoaFees: Double + -bedrooms: Double + -bathrooms: Double + +<> ResidentialProperty(id: String, address: String, price: String, hoaFees: Double, bedrooms: Double, bathrooms: Double) + +getHoaFees(): Double + +setHoaFees(newHoaFees: Double) + +getBedrooms(): Double + +setBedrooms(newBedrooms: Double) + +getBedrooms(): Double + +getBathrooms(): Double + +setBathrooms(newBathrooms: Double) +} + +skinparam classAttributeIconSize 0 +class Listing { + -properties: ArrayList + +setProperties(newProperties: ArrayList) + +getProperties(): ArrayList + +loadProperties(): Listing + +getProperty(address: String): Property +} + +skinparam classAttributeIconSize 0 +class MainActivity { + #onCreate(savedInstanceState: Bundle) +} + +CommercialProperty -u-|> Property +ResidentialProperty -u-|> Property +Listing *-d- Property +MainActivity .d.|> Listing +@enduml diff --git a/Summer-2024/CS-3443/Labs/Lab3/Layout.svg b/Summer-2024/CS-3443/Labs/Lab3/Layout.svg new file mode 100644 index 0000000..7907e44 --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/Layout.svg @@ -0,0 +1 @@ +Property-id: String-address: String-price: String+«constructor» Property(id: String, address: String, price: String)+toString(): String+setId(newId: String)+getId(): String+setAddress(newAddress: String)+getAddress(): String+setPrice(price: String)+getPrice(): StringCommercialProperty-id: String-address: String-price: String-zone: String-units: Integer-parkingSpots: Integer+«constructor» CommercialProperty(id: String, address: String, price: String, zone: String, units: Integer, parkingSpots: Integer)+setZone(newZone: String)+getZone(): String+setUnits(newUnits: Integer)+getUnits(): Integer+setParkingSpots(newParkingSpots: Integer)+getParkingSpots(): IntegerResidentialProperty-id: String-address: String-price: String-hoaFees: Double-bedrooms: Double-bathrooms: Double+«constructor» ResidentialProperty(id: String, address: String, price: String, hoaFees: Double, bedrooms: Double, bathrooms: Double)+getHoaFees(): Double+setHoaFees(newHoaFees: Double)+getBedrooms(): Double+setBedrooms(newBedrooms: Double)+getBedrooms(): Double+getBathrooms(): Double+setBathrooms(newBathrooms: Double)Listing-properties: ArrayList<Property>+setProperties(newProperties: ArrayList<Property>)+getProperties(): ArrayList<Property>+loadProperties(): Listing+getProperty(address: String): PropertyMainActivity#onCreate(savedInstanceState: Bundle) \ No newline at end of file diff --git a/Summer-2024/CS-3443/Labs/Lab3/README.org b/Summer-2024/CS-3443/Labs/Lab3/README.org new file mode 100644 index 0000000..f71a02a --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/README.org @@ -0,0 +1,26 @@ +* Lab 3 Submission +Name: =Price Hiller= + +ABC123: =zfp106= + +Date: =2024-07-05= + +URL: [[https://git.orion-technologies.io/Price/college/src/branch/Development/Summer-2024/CS-3443/Labs/Lab3]] + +** UML Diagram + +#+ATTR_HTML: :alt :align left :class img +[[./Layout.svg][UML Diagram of the program]] + +You can see the HTML rendering at [[./UML.html]] + +** Running the program + +To operate correctly the program must be ran from the top level directory! + +*** via Android Studio + +- Download the provided ~zip~ file +- Click =File= > =New= > =Import Project=... in Android Studio +- Select the downloaded ~zip~ file +- Run the application diff --git a/Summer-2024/CS-3443/Labs/Lab3/UML.html b/Summer-2024/CS-3443/Labs/Lab3/UML.html new file mode 100644 index 0000000..faa1798 --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/UML.html @@ -0,0 +1,38 @@ + + + + + + + zfp106 UML Diagram for Lab2 + + + +

+ Made in the dungeons with great pain in PlantUML (Lab3, + zfp106) +

+

+ Some notes on the decisions made here. + + + + + + + + + + + + + + +
QuestionAnswer
Why does the MainActivity class not show it's dependency relationship with AppCompatActivity?Because AppCompatActivity is coming from an external library, and as such not implemented by me.
Why do your concrete property classes (e.g. ResidentialProperty) not have toString() methods?Because they inherit the toString() method from their parent class Property.
+

+ +

The actual UML diagram below:

+ Uml Diagram + + + diff --git a/Summer-2024/CS-3443/Labs/Lab3/app/.classpath b/Summer-2024/CS-3443/Labs/Lab3/app/.classpath new file mode 100644 index 0000000..0a3280e --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/app/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Summer-2024/CS-3443/Labs/Lab3/app/.gitignore b/Summer-2024/CS-3443/Labs/Lab3/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/Summer-2024/CS-3443/Labs/Lab3/app/build.gradle.kts b/Summer-2024/CS-3443/Labs/Lab3/app/build.gradle.kts new file mode 100644 index 0000000..dc43bd9 --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/app/build.gradle.kts @@ -0,0 +1,43 @@ +plugins { + alias(libs.plugins.android.application) +} + +android { + namespace = "edu.utsa.cs3443.zfp106_lab3" + compileSdk = 34 + + defaultConfig { + applicationId = "edu.utsa.cs3443.zfp106_lab3" + minSdk = 26 + targetSdk = 34 + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation(libs.appcompat) + implementation(libs.material) + implementation(libs.activity) + implementation(libs.constraintlayout) + testImplementation(libs.junit) + androidTestImplementation(libs.ext.junit) + androidTestImplementation(libs.espresso.core) +} \ No newline at end of file diff --git a/Summer-2024/CS-3443/Labs/Lab3/app/proguard-rules.pro b/Summer-2024/CS-3443/Labs/Lab3/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/Summer-2024/CS-3443/Labs/Lab3/app/src/androidTest/java/edu/utsa/cs3443/zfp106_lab3/ExampleInstrumentedTest.java b/Summer-2024/CS-3443/Labs/Lab3/app/src/androidTest/java/edu/utsa/cs3443/zfp106_lab3/ExampleInstrumentedTest.java new file mode 100644 index 0000000..e13fd96 --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/app/src/androidTest/java/edu/utsa/cs3443/zfp106_lab3/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package edu.utsa.cs3443.zfp106_lab3; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("edu.utsa.cs3443.zfp106_lab3", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/Summer-2024/CS-3443/Labs/Lab3/app/src/main/AndroidManifest.xml b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..f67de15 --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/AndroidManifest.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Summer-2024/CS-3443/Labs/Lab3/app/src/main/assets/listings.csv b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/assets/listings.csv new file mode 100644 index 0000000..a57f290 --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/assets/listings.csv @@ -0,0 +1,8 @@ +rp12345, 123 River Rd - San Antonio - TX, 350900, 400, 4, 3 +cp54321, 23412 Hill St - San Antonio - TX, 1500000, industrial, 1, 10 +rp67890, 34 Deer Ct - San Antonio - TX, 100000, 0, 1, 1 +rp09876, 109 Medina St - Boerne - TX, 249000, 0, 2, 3 +cp32145, 9867 Bend St - Selma - TX, 190000, office districts, 2, 15 +rp32145, 223 River Rd - San Antonio - TX, 270000, 500, 3, 2.5 +rp87690, 435 Bee Rd - San Antonio - TX, 3505000, 0, 10, 7 +cp90876, 123 Factory Dr - San Antonio - TX, 350000, office districts, 1, 12 \ No newline at end of file diff --git a/Summer-2024/CS-3443/Labs/Lab3/app/src/main/java/edu/utsa/cs3443/zfp106_lab3/MainActivity.java b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/java/edu/utsa/cs3443/zfp106_lab3/MainActivity.java new file mode 100644 index 0000000..59e6e83 --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/java/edu/utsa/cs3443/zfp106_lab3/MainActivity.java @@ -0,0 +1,104 @@ +package edu.utsa.cs3443.zfp106_lab3; + +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.widget.Toast; +import androidx.activity.EdgeToEdge; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.graphics.Insets; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; +import edu.utsa.cs3443.zfp106_lab3.model.Listing; +import edu.utsa.cs3443.zfp106_lab3.model.Property; + +/** + * The main activity for this Android Application + * + */ +public class MainActivity extends AppCompatActivity { + + /** + * The primary driver for this program, handles the creation of the application + * + * @param savedInstanceState The saved instance state of the application + */ + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + Listing listing = Listing.loadProperties(this); + EdgeToEdge.enable(this); + setContentView(R.layout.activity_main); + ViewCompat.setOnApplyWindowInsetsListener( + findViewById(R.id.main), + (v, insets) -> { + Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()); + v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom); + return insets; + }); + + Button propertyOneButton = findViewById(R.id.propertyButtonOne); + Property propertyOne = listing.getProperties().get(0); + propertyOneButton.setText(propertyOne.toString()); + propertyOneButton.setOnClickListener( + new View.OnClickListener() { + @Override + public void onClick(View view) { + Toast toast = + Toast.makeText( + view.getContext(), + String.valueOf("$" + propertyOne.getPrice()), + Toast.LENGTH_SHORT); + toast.show(); + } + }); + + Button propertyTwoButton = findViewById(R.id.propertyButtonTwo); + Property propertyTwo = listing.getProperties().get(1); + propertyTwoButton.setText(propertyTwo.toString()); + propertyTwoButton.setOnClickListener( + new View.OnClickListener() { + @Override + public void onClick(View view) { + Toast toast = + Toast.makeText( + view.getContext(), + String.valueOf("$" + propertyTwo.getPrice()), + Toast.LENGTH_SHORT); + toast.show(); + } + }); + + Button propertyThreeButton = findViewById(R.id.propertyButtonThree); + Property propertyThree = listing.getProperties().get(2); + propertyThreeButton.setText(propertyThree.toString()); + propertyThreeButton.setOnClickListener( + new View.OnClickListener() { + @Override + public void onClick(View view) { + Toast toast = + Toast.makeText( + view.getContext(), + String.valueOf("$" + propertyThree.getPrice()), + Toast.LENGTH_SHORT); + toast.show(); + } + }); + + Button propertyFourButton = findViewById(R.id.propertyButtonFour); + Property propertyFour = listing.getProperties().get(3); + propertyFourButton.setText(propertyFour.toString()); + propertyFourButton.setOnClickListener( + new View.OnClickListener() { + @Override + public void onClick(View view) { + Toast toast = + Toast.makeText( + view.getContext(), + String.valueOf("$" + propertyFour.getPrice()), + Toast.LENGTH_SHORT); + toast.show(); + } + }); + } +} diff --git a/Summer-2024/CS-3443/Labs/Lab3/app/src/main/java/edu/utsa/cs3443/zfp106_lab3/model/CommercialProperty.java b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/java/edu/utsa/cs3443/zfp106_lab3/model/CommercialProperty.java new file mode 100644 index 0000000..08eb15d --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/java/edu/utsa/cs3443/zfp106_lab3/model/CommercialProperty.java @@ -0,0 +1,82 @@ +package edu.utsa.cs3443.zfp106_lab3.model; + +/** + * A given Commercial Property + * + *

A commercial property, in addition to a normal property, has a zone, number of units, and number of parking spots + * + */ +public class CommercialProperty extends Property { + public String zone; + public Integer units; + public Integer parkingSpots; + + /** + * Create a new Commercial Property + * + * @param id ID of the property + * @param address Address/location of the property + * @param price The price of the property + * @param zone The zone of the Commercial property + * @param units The number of units within the Commercial property + * @param parkingSpots The number of parking spots within the Commercial property + */ + public CommercialProperty( + String id, String location, String price, String zone, Integer units, Integer parkingSpots) { + super(id, location, price); + } + + /** + * Set the zone of the property + * + * @param newZone The new zone for the commercial property + */ + public void setZone(String newZone) { + this.zone = newZone; + } + + /** + * Get the zone of the commercial property + * + * @return The current zone of the Commercial property + */ + public String getZone() { + return this.zone; + } + + /** + * Set the number of units within the commercial property + * + * @param newUnits The new number of units for the commercial property + */ + public void setUnits(Integer newUnits) { + this.units = newUnits; + } + + /** + * Get the number of units of the commercial property + * + * @return The number of units in the commercial property + */ + public Integer getUnits() { + return this.units; + } + + /** + * Set the number of parking spots within the commercial property + * + * @param newParkingSpots The new number of parking spots for the commercial property + */ + public void setParkingSpots(Integer newParkingSpots) { + this.parkingSpots = newParkingSpots; + } + + /** + * Get the number of parking spots within the commercial property + * + * @return The number of parking spots within the commercial property + */ + public Integer getParkingSpots() { + return this.parkingSpots; + } +} diff --git a/Summer-2024/CS-3443/Labs/Lab3/app/src/main/java/edu/utsa/cs3443/zfp106_lab3/model/Listing.java b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/java/edu/utsa/cs3443/zfp106_lab3/model/Listing.java new file mode 100644 index 0000000..0123488 --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/java/edu/utsa/cs3443/zfp106_lab3/model/Listing.java @@ -0,0 +1,97 @@ +package edu.utsa.cs3443.zfp106_lab3.model; + +import android.content.res.AssetManager; +import edu.utsa.cs3443.zfp106_lab3.MainActivity; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Scanner; + +/** + * A listing of properties with the ability to load them from an external csv file + * + */ +public class Listing { + public ArrayList properties; + + /** + * Create a new listing of proeprties + * + * @param properties The listing of properties + */ + public Listing(ArrayList properties) { + this.setProperties(properties); + } + + /** + * Set the properties for the listing + * + * @param newProperties The new properties to set for the listing + */ + public void setProperties(ArrayList newProperties) { + this.properties = newProperties; + } + + /** + * Get the properties of the listing + * + * @return The properties of the listing + */ + public ArrayList getProperties() { + return this.properties; + } + + /** + * Load properties from a "listings.csv" file and return a Listing + * + * @param activity The activity of the android application + * @return A new Listing of properties + * @throws throw new RuntimeException(e); If unable to read the properties listing + */ + public static Listing loadProperties(MainActivity activity) { + AssetManager manager = activity.getAssets(); + ArrayList properties = new ArrayList<>(); + try { + InputStream file = manager.open("listings.csv"); + Scanner scan = new Scanner(file); + while (scan.hasNextLine()) { + String line = scan.nextLine(); + String[] propertyInfo = line.split(","); + String id = propertyInfo[0].trim(); + String address = propertyInfo[1].trim(); + String price = propertyInfo[2].trim(); + Property property; + if (id.startsWith("rp")) { + Double hoaFees = Double.parseDouble(propertyInfo[3].trim()); + Double bedrooms = Double.parseDouble(propertyInfo[4].trim()); + Double bathrooms = Double.parseDouble(propertyInfo[5].trim()); + property = new ResidentialProperty(id, address, price, hoaFees, bedrooms, bathrooms); + } else { + String zone = propertyInfo[3].trim(); + Integer units = Integer.parseInt(propertyInfo[4].trim()); + Integer parkingSpots = Integer.parseInt(propertyInfo[5].trim()); + property = new CommercialProperty(id, address, price, zone, units, parkingSpots); + } + properties.add(property); + } + return new Listing(properties); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + /** + * Return a single property given an address of the property + * + * @param address The address of the property + * @return The associated proprety with the address or null if not found + */ + public Property getProperty(String address) { + for (Property property : this.getProperties()) { + if (property.getAddress().equals(address)) { + return property; + } + } + return null; + } +} diff --git a/Summer-2024/CS-3443/Labs/Lab3/app/src/main/java/edu/utsa/cs3443/zfp106_lab3/model/Property.java b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/java/edu/utsa/cs3443/zfp106_lab3/model/Property.java new file mode 100644 index 0000000..95683c9 --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/java/edu/utsa/cs3443/zfp106_lab3/model/Property.java @@ -0,0 +1,90 @@ +package edu.utsa.cs3443.zfp106_lab3.model; + +/** + * A given Property + * + *

A property has an id, address, and a price + * + */ +public abstract class Property { + private String id; + private String address; + private String price; + + /** + * Create a new Property + * + * @param id ID of the property + * @param address Address/location of the property + * @param price The price of the property + */ + public Property(String id, String address, String price) { + this.setId(id); + this.setAddress(address); + this.setPrice(price); + } + + + /** + * Get the string representation of the property + * + * @return The string representation of the property + */ + public String toString() { + return this.getAddress(); + } + + /** + * Set the id of the property + * + * @param newId The new id to set for the property + */ + public void setId(String newId) { + this.id = newId; + } + + /** + * Get the id of the property + * + * @return The current id of the property + */ + public String getId() { + return this.id; + } + + /** + * Set the address for the property + * + * @param newAddress The new address for the property + */ + public void setAddress(String newAddress) { + this.address = newAddress; + } + + /** + * Get the address of the property + * + * @return The current address of the property + */ + public String getAddress() { + return this.address; + } + + /** + * Set the price for the property + * + * @param price The new price for the property + */ + public void setPrice(String price) { + this.price = price; + } + + /** + * Get the price of the property + * + * @return The current price of the property + */ + public String getPrice() { + return this.price; + } +} diff --git a/Summer-2024/CS-3443/Labs/Lab3/app/src/main/java/edu/utsa/cs3443/zfp106_lab3/model/ResidentialProperty.java b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/java/edu/utsa/cs3443/zfp106_lab3/model/ResidentialProperty.java new file mode 100644 index 0000000..bd35e4e --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/java/edu/utsa/cs3443/zfp106_lab3/model/ResidentialProperty.java @@ -0,0 +1,85 @@ +package edu.utsa.cs3443.zfp106_lab3.model; + +/** + * A given Residential Property + * + *

A residential property, in addition to a normal property, has HOA fees, a number of bedrooms, and a number of bathrooms + * + */ +public class ResidentialProperty extends Property { + private Double hoaFees; + private Double bedrooms; + private Double bathrooms; + + /** + * Create a new Residential Property + * + * @param id ID of the property + * @param address Address/location of the property + * @param price The price of the property + * @param hoaFees The annual HOA fees for the property + * @param bedrooms The number of bedrooms for the property + * @param bathrooms The number of bathrooms for the property + */ + public ResidentialProperty( + String id, String location, String price, Double hoaFees, Double bedrooms, Double bathrooms) { + super(id, location, price); + this.hoaFees = hoaFees; + this.bedrooms = bedrooms; + this.bathrooms = bathrooms; + } + + /** + * Get the annual HOA fees owed by the property + * + * @return The annual HOA fees owed by the property + */ + public Double getHoaFees() { + return this.hoaFees; + } + + /** + * Set the annual HOA fees owed for this property + * + * @param newHoaFees The annual HOA fees owed for this property + */ + public void setHoaFees(Double newHoaFees) { + this.hoaFees = newHoaFees; + } + + /** + * Get the number of bedrooms of this property + * + * @return The number of bedrooms of this property + */ + public Double getBedrooms() { + return this.bedrooms; + } + + /** + * Set the number of bedrooms for this property + * + * @param newBedrooms The number of bedrooms for this property + */ + public void setBedrooms(Double newBedrooms) { + this.bedrooms = newBedrooms; + } + + /** + * Get the number of bathrooms for this property + * + * @return The number of bathrooms for this property + */ + public Double getBathrooms() { + return this.bathrooms; + } + + /** + * Set the number of bathrooms for this property + * + * @param newBathrooms The number of bathrooms for this property + */ + public void setBathrooms(Double newBathrooms) { + this.bathrooms = newBathrooms; + } +} diff --git a/Summer-2024/CS-3443/Labs/Lab3/app/src/main/res/drawable/ic_launcher_background.xml b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Summer-2024/CS-3443/Labs/Lab3/app/src/main/res/drawable/ic_launcher_foreground.xml b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Summer-2024/CS-3443/Labs/Lab3/app/src/main/res/drawable/logo.jpeg b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/res/drawable/logo.jpeg new file mode 100644 index 0000000..60f28fc Binary files /dev/null and b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/res/drawable/logo.jpeg differ diff --git a/Summer-2024/CS-3443/Labs/Lab3/app/src/main/res/layout/activity_main.xml b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..7f6f120 --- /dev/null +++ b/Summer-2024/CS-3443/Labs/Lab3/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,66 @@ + + + + + +