Find Jobs
Hire Freelancers

Java Programs

$250-750 USD

Đã đóng
Đã đăng vào gần 12 năm trước

$250-750 USD

Thanh toán khi bàn giao
11:45 PM PST 6/5/2012 Objective: To learn how to use an inner class, object-type class attributes, StringBuffer, null values, and self-referential classes. Steps: (i) Create a new folder called 'assign72' under C:\Java\Lesson7. Copy all files (except [login to view URL]) of assign 7.1 into this folder. (ii) Modify classes as follows: Class Name: Home Attributes: • Remove the attributes: 'value' and 'commission' • Add a new attribute called 'hd' of type: HomeDerivedData • Add a new attribute called 'nextHome' of type: Home Constructor: • constructor (homeType, age, sqft): Modify this constructor to instantiate an object of the inner class HomeUtil and call computeDerivedData() on it, to update the 'hd' class attribute. Set 'nextHome' attribute to 'null' (without the quotes). Note that null is valid to use as a value of any object, and means the object is 'undefined'. Methods: • Getters for all attributes • Setter for 'nextHome' attribute only Inner Class: Class Name: HomeUtil Methods: • Copy computeDerivedData() method from [login to view URL] of assign 7.1 into this inner class, and modify it so that it doesn't take any input parameters and has a return type of 'void'. Inside the method body, update the 'hd' attribute of the Home class, to set its 'value' and 'commission', using same formulae as in assign 7.1. Class Name: HomeType Attributes: No change Constructor: No need to implement any constructor (as before) Methods: • Modify getTypeDescr() to return a StringBuffer instead of a String Class Name: HomeDerivedData Attributes: No change Constructor: Add a default constructor Methods: No change NOTE: [login to view URL]: NOT to be used anymore (iii) Modify the TestHome test driver so that it instantiates three Home type objects, as follows: • Home object # 1: Type: Single Family, age = 15 yrs, and sqft = 2000. • Home object # 2: Type: Condo, age = 8 yrs, and sqft = 1500. • Home object # 3: Type: Twon Home, age = 10 yrs, and sqft = 2500. The 'nextHome' for Home object # 1 should be Home object # 2; similarly, the 'nextHome' for Home object # 2 should be Home object # 3. To achieve this, call setNextHome() on Home object # 1, sending it Home object # 2. Similary, call setNextHome() on Home object # 2, sending it Home object # 3. Write a static method called 'printReport()' that takes a Home object, and a 'homeNbr' parameter of type: int. This method should print the content of the Home object (same as in assign 7.1, except that now the title for each home should include the home nbr. For example, for Home object # 1, it should say "Summary Report for Home # 1", and so on. Begin by copying the [login to view URL] lines from [login to view URL] of assign 7.1 into this method. Replace all [login to view URL] lines with String concatenation using the += operator, each time adding one line of output. Do NOT use one long String to concatenate all pieces, instead use += operator for each attribute of the Home object, and a SINGLE [login to view URL]() at the end of the method to dump the resulting String containing the full report for the Home object. Inside main(), declare a temporary Home type object called 'hTmp', and assign it the first Home object. Declare a loop index called 'i' and initialize to 1. Then use a while loop that loops as long as hTmp is not null. In each iteration of the loop, call 'printReport()' passing it the 'hTmp' object and a home nbr (the loop index), then set 'hTmp' to be the next Home object each time. Increment 'i' at the end of the loop. (iv) Compile [login to view URL], [login to view URL], [login to view URL], and then [login to view URL] and run the code. Verify that the output session looks similar to this: C:\Java\Lesson7\assign72>javac [login to view URL] C:\Java\Lesson7\assign72>javac [login to view URL] C:\Java\Lesson7\assign72>javac [login to view URL] C:\Java\Lesson7\assign72>javac [login to view URL] C:\Java\Lesson7\assign72>java TestHome Summary Report for Home # 1 Type: Single Family Age: 15
Mã dự án: 1679146

Về dự án

38 đề xuất
Dự án từ xa
Hoạt động 12 năm trước

Bạn muốn kiếm tiền?

Lợi ích khi chào giá trên Freelancer

Thiết lập ngân sách và thời gian
Nhận thanh toán cho công việc
Phác thảo đề xuất của bạn
Miễn phí đăng ký và cháo giá cho công việc
38 freelancer chào giá trung bình $277 USD cho công việc này
Avatar người dùng
Hi, kindly check your inbox for my inquiries. Thanks.
$250 USD trong 0 ngày
5,0 (1099 nhận xét)
7,7
7,7
Avatar người dùng
Please check your inbox. Thanks
$300 USD trong 2 ngày
4,9 (150 nhận xét)
7,1
7,1
Avatar người dùng
Hi, I am JAVA expert and can surely help you here, Please check your inbox,Thanks
$250 USD trong 1 ngày
4,7 (409 nhận xét)
7,4
7,4
Avatar người dùng
I have lot of experience in Java Programming, Please check your P.M.B. sir........
$250 USD trong 2 ngày
4,9 (56 nhận xét)
6,4
6,4
Avatar người dùng
Hi, I am expert at Java and can surely satisfy you. Please check your inbox,
$250 USD trong 0 ngày
5,0 (91 nhận xét)
6,1
6,1
Avatar người dùng
I can do this in 1 day
$250 USD trong 1 ngày
5,0 (60 nhận xét)
5,6
5,6
Avatar người dùng
I am confident to handle your project. Please check your inbox for details, thank you.
$250 USD trong 5 ngày
4,7 (99 nhận xét)
6,0
6,0
Avatar người dùng
Hi, I am ready to help on Inner class, String Buffer, Object-type attributes and self-referential classes. Thanks
$250 USD trong 0 ngày
4,4 (43 nhận xét)
5,2
5,2
Avatar người dùng
Dear sir. I can do this for you .Pls check your pmb
$250 USD trong 1 ngày
4,9 (17 nhận xét)
4,1
4,1
Avatar người dùng
Hi, I am an expert in Java, so It would be great for me to help you with this project.
$250 USD trong 4 ngày
5,0 (9 nhận xét)
3,4
3,4
Avatar người dùng
Hi, Please check PMB. Thanks
$250 USD trong 0 ngày
4,2 (2 nhận xét)
3,5
3,5
Avatar người dùng
Hello. I are you still interested in this project.
$250 USD trong 1 ngày
4,9 (4 nhận xét)
3,1
3,1
Avatar người dùng
check your pm!
$250 USD trong 3 ngày
4,7 (2 nhận xét)
2,5
2,5
Avatar người dùng
Hello, the tasks are simple and I can fully guarantee good coding and also good comments. Cheers.
$250 USD trong 1 ngày
5,0 (2 nhận xét)
1,9
1,9
Avatar người dùng
I can do this within few hours. Check PMB.
$250 USD trong 1 ngày
4,9 (2 nhận xét)
1,1
1,1
Avatar người dùng
I have a B.Sc. in Computer Science and am well versed in Java. I can get this done for you quickly. Thanks for considering my bid.
$250 USD trong 1 ngày
0,0 (0 nhận xét)
0,0
0,0
Avatar người dùng
I have been programming Java for 4 years, and am about to finish my Bachelor Degree in Computer Science. I am capable of quickly completing this project.
$250 USD trong 1 ngày
0,0 (0 nhận xét)
0,0
0,0
Avatar người dùng
Hi, Experienced and Certified Java developer and have developed such assignments in past. Let us discuss this and work. Thanks and Regards.
$250 USD trong 3 ngày
0,0 (0 nhận xét)
0,0
0,0
Avatar người dùng
I am an experienced Java developer by profession and I have done a very similar project during my undergraduate studies.
$250 USD trong 1 ngày
0,0 (0 nhận xét)
0,0
0,0
Avatar người dùng
my skype: vic_numberone I am ready to tackle your project will dedicate
$400 USD trong 3 ngày
0,0 (0 nhận xét)
0,0
0,0

Về khách hàng

Cờ của UNITED STATES
Mechanicsburg, United States
0,0
0
Thành viên từ thg 6 6, 2012

Xác thực khách hàng

Cảm ơn bạn! Chúng tôi đã gửi email chứa đường link để bạn lấy tín dụng miễn phí.
Đã xảy ra lỗi trong khi gửi email của bạn. Hãy thử lại.
Người Dùng Đã Đăng Ký Tổng Số Việc Đã Đăng
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Đang tải xem trước
Đã cấp quyền truy cập vị trí.
Phiên đăng nhập của bạn đã hết hạn và bạn đã bị đăng xuất. Hãy đăng nhập lại.