Question

The following is for a Java Program Create UML Class Diagram for these 4 java classes....

The following is for a Java Program

Create UML Class Diagram for these 4 java classes. The diagram should include:

1) All instance variables, including type and access specifier (+, -);

2) All methods, including parameter list, return type and access specifier (+, -);

3) Include Generalization and Aggregation where appropriate.

Java Classes description:

1. User Class

1.1 Subclass of Account class.

1.2 Instance variables

__ 1.2.1 username – String

__ 1.2.2 fullName – String

__ 1.2.3 deptCode – int representing the department code

__ 1.2.4 No other instance variables are needed.

1.3 Methods

__ 1.3.1 Default constructor sets all instance variables to a default value

____1.3.1.a Call the super class constructor passing appropriate parameters to it.

____ 1.3.1.b Set the rest of the variables

__ 1.3.2 Parameterized constructors

____ 1.3.2.a Takes in username, clearPassword and the key

____ 1.3.2.b Additional parameters include fullname, and dept code..

____ 1.3.2.c Call the super class constructor passing appropriate parameters to it.

__ 1.3.3 Accessor and mutator methods for all variables in this class. Mutator method should be used to set all instance fields.

__ 1.3.4 toString

____ 1.3.4.a Calls super class methods as needed.

____ 1.3.4.b Returns a nicely formatted String representing the user to include fullName, username, deptCode, accountID number, clearPassword, encryptPassword and key

2. Bot Class

2.1 Subclass of Account class.

2.2 A class that stores information about an application that performs an automated task.

2.3 Instance Variables

__ 2.3.1 botFileName – String representing the file name of the bot

__ 2.3.2 category – String providing the Bot category which will be either IDS, SysAdm, or HelpDesk.

__ 2.3.3 dateUpdated – GregorianCalendar object (from the Java API) that shows the date the Bot was last updated.

__ 2.3.4  createdBy – String representing the creator name or handle.

2.4 Methods

__ 2.4.1 Default constructor sets all instance variables to a default value

____ 2.4.1.a Call the super class constructor passing appropriate parameters to it.

____ 2.4.1.b Set the rest of the variables

__ 2.4.2 Parameterized Constructor

____ 2.4.2.a Takes in all parameters required to set the instance variables.

____ 2.4.2.b Date is a String in the format mm/dd/yyyy.

____ 2.4.2.c Convert the date to a format compatible with creating GregorianCalendar object.

____ 2.4.2.d  Create the GregorianCalendar object

____ 2.4.2.e Call the super class constructor passing appropriate parameters to it

__ 2.4.3 Accessor and mutator methods for all variables in this class.

__ 2.4.4 toString

____ 2.4.4.a Calls super class methods as needed

____ 2.4.4.b Returns a nicely formatted String representing the Bot to include Bot file name, purpose, date updated, creator name, accountID number, clearPassword, encryptPassword and key

3. Account class

3.1 Superclass Abstract Class

3.2 Instance variables

__ 3.2.1 clearPassword String

__ 3.2.2 encryptedPassword : String

__ 3.2.3  key : String

__ 3.2.4 accountId - A unique integer that identifies each account

__ 3.2.5 nextIDNum – a static int that starts at 1000 and is used to generate the accountID

__ 3.2.6 no other instance variables needed.

3.3 Default constructor – set all instance variables to a default value.

3.4 Parameterized constructor

__ 3.4.1 Takes in clearPassword, key.

__ 3.4.2  Calls encrypt method to create encryptedPassword

__ 3.4.3 Call mutator methods to set other instance variables.

3.5 Accessor/mutator methods (Standard except as follows)

__ 3.5.1  setClearPassWord - mutator needs to call encrypt method

__ 3.5.2 no encryptedPassword mutator method

__ 3.5.3 setKey mutator needs to call encrypt method.

__ 3.5.4 accountId mutator - uses the static variable nextIDNum to retrieve the next available userID number

3.6 encrypt method

Private method – only accessible to other methods of the User class
Uses the Vigenere Cypher to encrypts the clearPassword instance variable using the key
Stores the encrypted password in encryptPassword instance variable.

3.7 toString - returns a nicely formatted String representing the instance variables of the Account class

4. CompanyAccounts Class

4.1 The array will be of type Account

4.2 Method names, return types and parameters would change from User to the new super class Account for example

__ 4.2.1 getUser would change to getAccount and return an Account Object

__ 4.2.2 addUser would change addAccount and its parameter would be of type Account.

Homework Answers

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Please show fully functioning java code and outputs. Design a Java Animal class (assuming in Animal.java...
Please show fully functioning java code and outputs. Design a Java Animal class (assuming in Animal.java file) and a sub class of Animal named Cat (assuming in Cat.java file).   The Animal class has the following protected instance variables: boolean vegetarian, String eatings, int numOfLegs and the following public instance methods: constructor without parameters: initialize all of the instance variables to some default values constructor with parameters: initialize all of the instance variables to the arguments SetAnimal: assign arguments to all...
Write the Game class, Java lanuage. A Game instance is described by three instance variables: gameName...
Write the Game class, Java lanuage. A Game instance is described by three instance variables: gameName (a String), numSold (an integer that represents the number of that type of game sold), and priceEach (a double that is the price of each of that type of Game). I only want three instance variables!! The class should have the following methods: A constructor that has two parameter – a String containing the name of the Game and a double containing its price....
Haviing trouble with my homework (java) 1)Write the class CustomerAccount, which has fields/attributes called custID of...
Haviing trouble with my homework (java) 1)Write the class CustomerAccount, which has fields/attributes called custID of type String, custName of type String and checkingBalance of type double and savingBalance of type double 2)Write the constructor for CustomerAccount class. The constructor takes parameters to initialize custID, custName, checkingBalance and savingBalance. 3)Write the mutator method for all attributes of the class CustomerAccount. then Write the toString method for class CustomerAccount.
Modify the Employee9C superclass so that is an abstract superclass with a constructor to set its...
Modify the Employee9C superclass so that is an abstract superclass with a constructor to set its variables (firstName and lastName). It should contain an abstract method called payPrint. Below is the source code for the Employee9C superclass: public class Employee9C {    //declaring instance variables private String firstName; private String lastName; //declaring & initializing static int variable to keep running total of the number of paychecks calculated static int counter = 0;    //constructor to set instance variables public Employee9C(String...
(JAVA) Create a class that represents a Customer. Use good OO programming technique. A Customer has...
(JAVA) Create a class that represents a Customer. Use good OO programming technique. A Customer has a firstName, lastName, customerNumber, emailAddress. You can add some more fields if you want to, but those 4 are a minimum. Override the equals method, and the toString method from the Object class. Implement the Comparable interface. In the main method, create some instances of the Customer class, and demonstrate the use of the accessor and mutator methods, as well as the compareTo method.
Java Programming In this lab students continue to write programs using multiple classes. By the end...
Java Programming In this lab students continue to write programs using multiple classes. By the end of this lab, students should be able to Write classes that use arrays and ArrayLists of objects as instance variables Write methods that process arrays and ArrayLists of objects Write getter and setter methods for instance variables Write methods using object parameters and primitive types Question- class StringSet. A StringSet object is given a series of up to 10 String objects. It stores these...
Java Program Implement a class called AnimalTrainer. Include the following data types in your class with...
Java Program Implement a class called AnimalTrainer. Include the following data types in your class with the default values denoted by dataType name : defaultValue - String animal : empty string - int lapsRan : 0 - boolean resting : false - boolean eating : false - double energy : 100.00 For the animal property implement both getter/setter methods. For all other properties implement ONLY a getter method Now implement the following constructors: 1. Constructor 1 – accepts a String...
Write the program in java Implement a class Product. Create instance variables to store product name...
Write the program in java Implement a class Product. Create instance variables to store product name and price and supply the values through constructor. For example new Product(“Toaster’, 29.95). Create methods, getName, getPrice. Write a method productPrinter that prints the product name and its price after reducing it by $5. Create a main class and necessary constructs in the main class to run the Product class.
Design a class with the following requirements: 1- give the class a name from your choice....
Design a class with the following requirements: 1- give the class a name from your choice. 2- write some code that creates three instance variables, choose a name and type for each one of them. (must have two private and one public variables) 3- Initialize the variables using two different constructors. 4- Use mutator and accessor methods (set and get) for the private data members. 5- Display the value of each member variable using a method. 6- In the main,...
Java For this assignment you need to create at least 5 classes. 1.Create a vehicle class...
Java For this assignment you need to create at least 5 classes. 1.Create a vehicle class ( super class) 2,3. Create two sub classes ( car, bus , truck train or any) for vehicle class 4 Create a subclass (sportscar or schoolbus or Goodstrain or any) for car or bus You need to use the following atleast for one class. Use a protected variable Add constructor for superclass and subclass Override a method which displays a description about the vehicle...