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

  Create program which computes person-s bmi

Create a program which computes a person's body mass index? Design a modular program that calculates and display a person's body mass index (BMI).

  What are tools and strategies to increase traffic website

Select a web site from an education industry (university, school or training center) and analyze the ease of use of at least 3 functions and/or features?

  Design the array to do letter count for letters in alphabet

Design the array of 26 components to do letter count for 26 letters in alphabet and a variable for line count. (You may wish to call these variables letterCount and lineCount respectively.)

  Create a program that prints a book

Create a program that prints a book. The book consists of the following components: A title and author and  Three chapters

  Problem 1you have gathered the following information for a

problem 1you have gathered the following information for a friend who manages a restaurant. you will use this data for

  Complete the project coding in your lab php and mysql

ICTPRG527 Apply intermediate object-oriented language skills Assignment. Write a simple Design Project Proposal call proposal.docx including: Case Description; Complete the project coding in your Lab PHP and MySQL developing environment: (i.e. Dreamw..

  Write the output from your instrument class methods

Write the output from your Instrument class methods to a text file that a user entered from the command line arguments (e.g. java violinOutput.txt). This allows your program to accept filenames from the user via a command line argument.

  Create an employee object using the default constructor

Create an Employee object using the default constructor. Format the currency using the following formatting services. Display the Employee information.

  Program to calculate cost of purchase-requests from user

Program calculates cost of purchase, requests another item selection from user, and so on. User enters 0 from item menu to quit.

  How many bit strings of length 8 are palindromes

How many bit strings of length 6 is there that begin with 0 or end with a 1?

  Write a function called stream-map

Write a function that produces a stream of positive prime numbers . Use that stream to create a list of the product of all pairs of consecutive prime numbers up to a given value.

  COMP1000 UNIX and C Programming Assignment

COMP1000 UNIX and C Programming Assignment Help and Solution - Curtin University, Australia. Design, code (in C89), test and debug a modified battleships game

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