As a design activity- the class diagram from a set of


Objectives:

 

-          Learn how to express class relationships in Java language syntax.

-          Learn how to create (or instantiate) and populate objects of classes.

-          Learn how to do simple unit testing. 

Instructions:

In assignment #2 you constructed -as a design activity- the class diagram from a set of classes which form the basis for a simple project management tool. Your design should have the following classes: Employee Class, Project Class, Consultant Class, Manager Class, the Assignment Class, and any other classes you may added. In this assignment you are asked to translate your design into Java code.

Important Note: Your code should be consistent with your design in terms of class’s relationships, naming of classes, instances variables, visibility and methods. Any differences or modifications to your design from assignment #2 should be justified and explained, i.e. submit your old and the new modified design.

You task:

(1)   Implementation task: Write a client program (Main class) to test all classes. You should use proper methods to set and get data in the derived classes. You output should have an appropriate format (see 4 below) for displaying the contents of each class object; you could lose ½ the points for unformatted output.

(2)   Your code should be fully documented (classes, methods, etc.)

(3)   In the program main class, you should create and populate objects from each class type using the Java Scanner class i.e. you program should prompt the user to type in the input data to populate the class object’s data (in this process you are assigning the input date to the object instance variables).  Make sure you are using set methods of the class to populate the class instance variables and then use the get methods to print out the data.

(4)   Use the array data structure to store the assignments id numbers into the project class. No need to store the whole assignment objects into the array (use array of integers with size 10, fill the array with integers from 1-10). The Date can be a string type no needs to check the validity of the date.

Warning: Do not use the class constructor to populate the object data. You should write your own set and get methods for each class (use one method to populate each class and another method to print the data from the class). The Main class or in a separate class call the methods to populate and print the different class’s objects. In each method, you first create the class object, then populate the object data using Java scanner, and then print the object data in a readable format. (Or you can create the objects in the main class and pass it to your methods).

(5)    Print the object data in the following format (clean your output):

·  Expected Format for your output: ( Create 2 sample objects from each class)

      Example (1) of object Employee:

Id#

Name :

Age:

etc.

 

Example (2) of object Employee:

 

Id#

Name :

Age:

etc.

 

Example (1) of object Project:Id#

 

Name :

Manager:

Start_Date:

etc. 

Similar output for all other class’s objects 

(4)   Code, Compile, Run, and Save the output in a text file with the name lab4output.txt into lab4 folder. 

  1. Save all your work.
  2. Print a hard copy of your Java program (use the IDE for printing).
  3. Submit a hard copy of the following documents and staple them in the following order: 

1) A cover page,

2) A copy of your Graded design from assignment #2, if you modified your old design (corrected the errors) you need to submit the old and the new modified design also.

3) Your code (submit softcopy & hard copy of your code and the sample outputs), include your team members names on all code files. 

4) Your output (clean your output from any other text messages you may used during the data input).  

  1. In your personal storage, rename “Lab4” folder to “Lab4_yourName then copy the file (s) which include your new design (after correction) to the same folder and create a Zipped file for all files including the output file). 
  1. Upload your zipped files to the Moodle website, and click submit.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: As a design activity- the class diagram from a set of
Reference No:- TGS01189334

Expected delivery within 24 Hours