Goal and Directions: In this activity, you will design and implement a Person class based on a UML class model. Complete the following tasks for this activity: Execution Execute this assignment...

Goal and Directions:

In this activity, you will design and implement a Person class based on a UML class model. Complete the following tasks for this activity:



Execution


Execute this assignment according to the following guidelines:



  1. Create a UML diagram for a Person class by using your favorite UML drawing tool, such as Microsoft Word, Microsoft Visio, Draw.io, or something else. Create a variety of properties and methods that describe what a person’s attributes and actions. Students taking this course on campus should do an in-class activity with the whiteboard to model a Person class.

  2. Create a new Java Project using the File à New à Java Project menu items and name your projecttopic1-2. Also validate that your project is configured to use the JavaSE-1.8 JRE. Click the Finish button.

  3. Right click on the project folder within the Project and select the New à Class menu options. Name your classPerson and put in a package namedapp. Click thepublic static void main() method creation option. Click Finish.


    1. Add the state variables that were modeled as class private member variables.

    2. Create a constructor that initializes your Person state variables with parameter values.

    3. Create a getter and setter method for all of the state variables using Eclipse Refactoring (use the Source à Generate Getter and Setters…. menu options).





    1. Add the behavior methods that were modeled as public class methods.

    2. Add console print statements to each method that displays appropriate testing messages.





    1. In themain() method, create an instance of thePerson class and call each of the public methods.




  1. Run the Person class.

  2. Take a screenshot of the console when executing the Person class.

  3. Provide a brief (3- to 4-sentence) description of how and why the output was displayed.

  4. Using JavaDoc conventions using Eclipse (enter /** [return] above each class method), document your class and all methods. Generate the JavaDoc using Eclipse with following steps:


    1. Select the Project à Generate Javadoc… menu options.

    2. Select your project.

    3. Use the standard doclet.

    4. Set the location where you want the JavaDoc generated. The default location is the doc folder inside of the project.

    5. Click the Generate button.

    6. Validate the documentation by opening theindex.html generated by JavaDoc.




  1. Create a UML class diagram of your Person class.


Deliverables:


The following need to be submitted as this part of the activity:



  1. Theory of operation write-ups.

  2. UML class diagram of the Person class.

  3. Screenshot of the console output when running the Person class.

  4. Submit a zip file of your source code, including the generated Javadoc files.




Part 2: Using the Debugger



Overview


Goal and Directions:


In this activity, you will be given some tutorials and various debugger operations, such as setting breakpoints, inspecting variables, stepping thru code, and inspecting the call stack, that you will practice using code developed in this activity. The following are requirements to complete this activity:



Execution


Execute this assignment according to the following guidelines:



  1. Read the Eclipse Debugger tutorial at http://www.vogella.com/tutorials/EclipseDebugging/article.html. Open the Debug Perspective in Eclipse. Inspect each of the Debugger Icons by hovering your mouse over each of the icons, as well as the Debug menu items located within the Run menu.

  2. Open the project fromtopic1-2 project.



  1. Setting Breakpoints:


    1. Open up thePerson class.

    2. Set a breakpoint on one of the statements in themain() method and another breakpoint on one of the classes methods.

    3. Run the application in debug mode by clicking the Debug icon from the Eclipse toolbar.

    4. Take a screenshot of the first breakpoint stopped in the debugger.

    5. Click the Resume icon from the Eclipse toolbar.

    6. Take a screenshot of the second breakpoint stopped in the debugger.

    7. Remove all breakpoints.

    8. Click the Resume icon from the Eclipse toolbar.


  2. Inspecting Variables:


    1. Remove the breakpoints that were previously set.

    2. Set a new breakpoint on a different method in the class.

    3. Run the application in debug mode by clicking the Debug icon from the Eclipse toolbar.

    4. Inspect all of the class member variables in the Variables Window.

    5. Take a screenshot of the Variables Window in the debugger.

    6. Remove all breakpoints.

    7. Click the Resume icon from the Eclipse toolbar.


  3. Stepping Into a Function, Step Over Function, and Step Return from a function:


    1. Set a breakpoint on one of the statements in themain()that calls a method in thePerson class.

    2. Run the application in debug mode by clicking the Debug icon from the Eclipse toolbar.

    3. Verify that code stopped at the breakpoint.

    4. Click the Step Into icon from the Eclipse toolbar to step into the method.

    5. Verify that you are in line 1 of the method.

    6. Click the Step Over icon from the Eclipse toolbar and inspect all local variables during each step. Continue clicking the Step Over icon until you have reached the last line of the method.

    7. Click the Step Return icon from the Eclipse toolbar.

    8. Verify that you are in the method callback in themain() method.

    9. Take a screenshot of the debugger.

    10. Click the Resume icon from the Eclipse toolbar.

    11. Remove all breakpoints.


  4. Inspecting the Call Stack:


    1. Set a breakpoint on one of the statements in themain()that calls a method in thePerson class.

    2. Run the application in debug mode by clicking the Debug icon from the Eclipse toolbar.

    3. Verify that code stopped at the breakpoint.

    4. Click the Step Into icon from the Eclipse toolbar to step into the method.

    5. Verify that you are in line 1 of the method.

    6. Click the Step Over icon from the Eclipse toolbar and inspect all local variables during each step. Continue clicking the Step Over icon until you have reached the last line of the method.

    7. Inspect the Debug (Call Stack) Window.

    8. Take a screenshot of the Debug (Call Stack) Window.

    9. Remove all breakpoints.

    10. Click the Resume icon from the Eclipse toolbar.




Deliverables:


The following need to be submitted as this part of the activity:



  1. Screenshot from the Setting Breakpoints task.

  2. Screenshots from the Inspecting Variables task.

  3. Screenshots from the Stepping task.

  4. Screenshot from the Inspecting Call Stack task.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here