Explore BrainMass
Share

commenting on the enclosed code

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

I need assistance in commenting on the enclosed code, consider things like code layout, use of variable names, general readability and understandability.

The enclosed program suppose to Implement a class called ShortAddress that has the following attributes: firstName, secondName, and phoneNumber. Also, implement a class called FullAddress that inherits the above attributes while adding the attributes (int) houseNumber (simply 1, 2, ... etc. - i.e. no 1a or 3b's allowed), street1Name, street2Name and cityName. We are not suppose to forget to use the keyword super in the constructor. The application class to allow the user to input an address details and then give the user the choice of viewing the short address details or the long address details. This means the final answer should have a minimum of 3 classes for the application - We may use more if we are including utility classes. Further we are suppose to use Use exception handling to make the program robust.

© BrainMass Inc. brainmass.com October 24, 2018, 9:21 pm ad1c9bdddf
https://brainmass.com/computer-science/software-development/commenting-on-the-enclosed-code-124304

Attachments

Solution Preview

In general it is a good software programming practice to follow variable naming conventions. For example, include abbreviated form of variable type as prefix.

Also, it is a good habit to include input(s), output(s) and brief remark about the function of the method.

A better design in this approach is to have a class for input and an output which can use the print methods of JWAddressAdvanced.java and JWAddressSimple.java.
One easy ...

Solution Summary

This job helps with commenting on the enclosed code.

$2.19
See Also This Related BrainMass Solution

Commenting on the enclosed Java Code

I need assistance in commenting on the enclosed code, consider things like code layout, use of variable names, general readability and understandability.

The enclosed program suppose to Implement a class called ShortAddress that has the following attributes: firstName, secondName, and phoneNumber. Also, implement a class called FullAddress that inherits the above attributes while adding the attributes (int) houseNumber (simply 1, 2, ... etc. - i.e. no 1a or 3b's allowed), street1Name, street2Name and cityName. We are not suppose to forget to use the keyword super in the constructor. The application class to allow the user to input an address details and then give the user the choice of viewing the short address details or the long address details. This means the final answer should have a minimum of 3 classes for the application - We may use more if we are including utility classes. Further we are suppose to use Use exception handling to make the program robust.

View Full Posting Details