Design and implement person class based on a uml class model

Assignment Help Programming Languages
Reference no: EM132902145

Part 1: Designing, Coding, and Documenting a Person Class

Overview

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 project topic1-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 class Person and put in a package named app. Click the public static void main() method creation option. Click Finish.
a. Add the state variables that were modeled as class private member variables.
b. Create a constructor that initializes your Person state variables with parameter values.
c. Create a getter and setter method for all of the state variables using Eclipse Refactoring (use the Source ? Generate Getter and Setters.... menu options).

d. Add the behavior methods that were modeled as public class methods.
e. Add console print statements to each method that displays appropriate testing messages.

f. In the main() method, create an instance of the Person class and call each of the public methods.

4. Run the Person class.
5. Take a screenshot of the console when executing the Person class.
6. Provide a brief (3- to 4-sentence) description of how and why the output was displayed.
7. 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:
a. Select the Project ? Generate Javadoc... menu options.
b. Select your project.
c. Use the standard doclet.
d. Set the location where you want the JavaDoc generated. The default location is the doc folder inside of the project.
e. Click the Generate button.
f. Validate the documentation by opening the index.html generated by JavaDoc.

8. Create a UML class diagram of your Person class.
Deliverables:
The following need to be submitted as this part of the activity:
a. Theory of operation write-ups.
b. UML class diagram of the Person class.
c. Screenshot of the console output when running the Person class.
d. 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. 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 from topic1-2 project.

1. Setting Breakpoints:
a. Open up the Person class.
b. Set a breakpoint on one of the statements in the main() method and another breakpoint on one of the classes methods.
c. Run the application in debug mode by clicking the Debug icon from the Eclipse toolbar.
d. Take a screenshot of the first breakpoint stopped in the debugger.
e. Click the Resume icon from the Eclipse toolbar.
f. Take a screenshot of the second breakpoint stopped in the debugger.
g. Remove all breakpoints.
h. Click the Resume icon from the Eclipse toolbar.

2. Inspecting Variables:
a. Remove the breakpoints that were previously set.
b. Set a new breakpoint on a different method in the class.
c. Run the application in debug mode by clicking the Debug icon from the Eclipse toolbar.
d. Inspect all of the class member variables in the Variables Window.
e. Take a screenshot of the Variables Window in the debugger.
f. Remove all breakpoints.
g. Click the Resume icon from the Eclipse toolbar.

3. Stepping Into a Function, Step Over Function, and Step Return from a function:
a. Set a breakpoint on one of the statements in the main() that calls a method in the Person class.
b. Run the application in debug mode by clicking the Debug icon from the Eclipse toolbar.
c. Verify that code stopped at the breakpoint.
d. Click the Step Into icon from the Eclipse toolbar to step into the method.
e. Verify that you are in line 1 of the method.
f. 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.
g. Click the Step Return icon from the Eclipse toolbar.
h. Verify that you are in the method callback in the main() method.
i. Take a screenshot of the debugger.
j. Click the Resume icon from the Eclipse toolbar.
k. Remove all breakpoints.

4. Inspecting the Call Stack:
a. Set a breakpoint on one of the statements in the main() that calls a method in the Person class.
b. Run the application in debug mode by clicking the Debug icon from the Eclipse toolbar.
c. Verify that code stopped at the breakpoint.
d. Click the Step Into icon from the Eclipse toolbar to step into the method.
e. Verify that you are in line 1 of the method.
f. 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.
g. Inspect the Debug (Call Stack) Window.
h. Take a screenshot of the Debug (Call Stack) Window.
i. Remove all breakpoints.
j. Click the Resume icon from the Eclipse toolbar.

Deliverables:
The following need to be submitted as this part of the activity:
a. Screenshot from the Setting Breakpoints task.
b. Screenshots from the Inspecting Variables task.
c. Screenshots from the Stepping task.
d. Screenshot from the Inspecting Call Stack task.

Attachment:- Programming Exercise.rar

Reference no: EM132902145

Questions Cloud

Discuss the neurobiological basis for the disorder : Discuss the neurobiological basis for the disorder. Describe how the diagnosis is made (e.g., findings on brain imaging, laboratory testing, etc.).
Describe the typical first-day return of an IPO : Describe the typical first-day return of an IPO and the long-term returns to IPO investors.
What is the value of stock that must be sold : The estimated pre-IPO value of equity in the company is about $63 million, what is the value of stock that must be sold
Competitive and noncompetitive inhibition : What is a energy of activation ? Name the differences between competitive and noncompetitive inhibition.
Design and implement person class based on a uml class model : Design and implement a Person class based on a UML class model - Run the application in debug mode by clicking the Debug icon from the Eclipse toolbar
Why was the company being sued : Describe the results of the case. How was the matter resolved? Who won? Did the organization settle for a certain amount of money?
Why would a company consider going public : Why would a company consider going public? What are some advantages and disadvantages
Can recall and instance of the happening : Can you recall and instance of this happening to you or someone you know? If so, please explain. What happened? What type of error do you think
Differentiate between private placement and public offering : Question - Randy's, a family-owned restaurant chain operating in Alabama, Differentiate between a private placement and a public offering

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd