
Could somebody help me to solve this question. I am glad to hear ideas or answers from everyone. The situation: Complete the class House and HouseApp below to display
class House{ int lotNo; String type; //Bungalow, SemiDetached double price;
public House ( int l, String t, double p) { â?¦ }
public int theLotN() { â?¦ }
public String theType(){â?¦}
public double thePrice() { â?¦ }
public void setPrice(double p) {â?¦}
}
public class HouseApp{ public static void main(String []args){
// declare two ArrayList named listHouse1 and listHouse2
int lt;
String tp;
double pc;
// prompt user to insert 4 housesâ?? information into the ArrayList // display the housesâ?? information using the following format // // HOUSE IN TAMAN ILMU // LOTNO TYPE PRICE // â?¦â?¦â?¦ â?¦â?¦. â?¦â?¦â?¦.
Use the information below as the program input:
HOUSES IN TAMAN ILMU
LotNo Type Price 10021 Bungalow 500,000.00 10022 Bungalow 700,000.00 10023 Semi Detached 450,000.00 10024 Semi Detached 300,000.00
Modify the coding to check for the price which is more than RM 450000. If it is fullfill the requirement:
i. remove it from the ArrayList ii. calculate the new price for the house by deducting 30% discount off the original price and insert the house information into another ArrayList.
Display the housesâ?? information using the following format:
// HOUSE IN TAMAN ILMU LESS THAN RM450000 // LOTNO TYPE PRICE // ��� ��. ���.
// HOUSE IN TAMAN ILMU MORE THAN RM450000 // LOTNO TYPE NEW PRICE // ��� ��. ���.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.