Need help finishing this Java project. Please help and explain in detail in order to learn as
Question:
Need help finishing this Java project. Please help and explain in detail in order to learn as much as possible. This is just one big question/program. Implement a super class in Java to produce reusable classes.Develop a program with several classes. Develop a program using an Array of object references. Extend the functionality of existing classes. Use method calls to perform logic steps. Implement a solution involving polymorphism. Background Information: 1. An internet bot, also known as web robot, WWW robot or simply bot, is a software application that runs automated tasks (scripts) over the Internet. 2. Typically, bots perform tasks that are both simple and structurally repetitive, at a much higher rate than would be possible for a human alone. More than half of all web traffic is made up of bots. 3. It turns out that Bots use passwords similar to the way users do. 4. Both User and Bots need passwords to access system. The basic objective of Programming Project 2 is to create classes that enable you to develop an application that can manage both types of accounts. 5. This functionality can be realized by implementing inheritance.
6. Encryption Algorithm will be the Vigenere Cipher as we used in Programming Project 1 7. Much of the functionality will come from Programming Project 1. Project Requirements: 1. Account class 1. Superclass 2. Instance variables 1. clearPassword 1. String 2. Must be at least 8 characters long 2. encryptedPassword : String 3. key 1. String 2. Must 5 characters 4. accountId - A unique integer that identifies each account 5. nextIDNum - a static int that starts at 1000 and is used to generate the accountID 6. no other instance variables needed. 3. Default constructor - set all instance variables to a default value. 4. Parameterized constructor 1. Takes in clearPassword, key. 2. Calls encrypt method to create encryptedPassword 5. setClearPassWord(String newPassword) 1. Takes in a new clear text password. 2. Calls encrypt method as the encrypted password would need to change. 6. no encryptedPassword mutator method 7. setKey(String) 1. Takes in a new key 2. calls encrypt method as the encrypted password would need to change. 8. accountId mutator - uses the static variable nextIDNum to retrieve the next available userID number 9. encrypt method 1. Uses the instance variables clearPassword and key to encrypt the password. 2. Stores the encrypted password in the encryptedPassword instance variable 3. Use the Vigenere Cipher as described in Programming Project 1. 10. toString - returns a nicely formatted String representing the instance variables of the Account class
NOTE: Your Account class should ensure the clearPassword and the key are valid as described in the requirements. If not display an error message to the standard output and continue. Set the clearPassword, encyrptedPassword and the key to the empty String. 2. User Class 1. Subclass of Account class. 2. Instance variables 1. username - String 2. fullName - String 3. deptCode - int representing the department code 4. No other instance variables are needed. 3. Methods 1. Default constructor sets all instance variables to a default value 1. Call the super class constructor passing appropriate parameters to it. 2. Set the rest of the variables 2. Parameterized constructors 1. Call the super class constructor passing appropriate parameters to it. 2. Set the rest of the variables to the remaining parameters 3. Accessor and mutator methods for all variables in this class 4. toString 1. Calls super class methods as needed. 2. Returns a nicely formatted String representing the user to include fullName, username, deptCode, accountID number, clearPassword, encryptPassword and key
3. Bot Class 1. Subclass of Account class. 2. A class that stores information about an application that performs an automated task. 3. Instance Variables 1. botFileName - String representing the file name of the bot 2. category - String providing the Bot category which will be either IDS, SysAdm, or HelpDesk. 3. dateUpdated - GregorianCalendar object (from the Java API) that shows the date the Bot was last updated. 4. createdBy - String representing the creator name or handle. 4. Methods 1. Default constructor sets all instance variables to a default value 1. Call the super class constructor passing appropriate parameters to it. 2. Set the rest of the variables 2. Parameterized Constructor 1. Takes in all parameters required to set the instance variables. 2. Call the super class constructor passing appropriate parameters to it 3. Set the rest of the variables to the remaining parameters 4. Date is a String in the format mm/dd/yyyy. 5. Convert the date to a format compatible with creating GregorianCalendar object. 6. Create the GregorianCalendar object 3. Accessor and mutator methods for all variables in this class. 4. toString 1. Calls super class methods as needed 2. Returns a nicely formatted String representing the Bot to include Bot file name, purpose, date updated, creator name, accountID number, clearPassword, encryptPassword and key
4. The AccountTester 1. This class should consist of a main method that tests all the methods in each class, either directly by calling the method from the Tester or indirectly by having another method call a method. 2. User and Bot information will be read from a file. A sample file is provided. Use this file format to aid in grading. Using file processing makes entering and testing program with data sets much more efficient. 3. The file created should include valid and invalid passwords that fully tests the application. 4. Included is file called data.txt contains Account data. Your project will be graded using a similar input file. Your project must run with an input file formatted as data.txt is formatted. Note the file format is as follows: 1. Character designation of type of player ( u- User, b - Bot) 2. User - username,fullname,deptCode 3. Bot - botFilename,category,dateUpdated,createdBy 4. Account data - common data for both types 5. Develop an array of Account objects. 6. Populate the array with both User and Bot objects. 7. Retrieves each object stored in the array and calls its toString method polymorphically and displays the results. 5. JUnit Testing 1. To ease into JUnit Testing develop a JUnit test class that tests the encrypt method. 2. Create just one test using z3Br@d0G as the clear text password. house as key. 7. Create UML Class Diagram for the final version of your project. The diagram should include: 1. All instance variables, including types and access specifier (+, -); 2. All methods, including parameter list, return types and access specifier (+, -); 3. Include Generalization and Aggregation where appropriate. 4. The AccountTester does not need to be included. 5. Refer to the UML Distilled pdf on the content page as a reference for creating class diagrams. 6. A Link to a drawing program, Dia, is also posted on the content page.
Organizational Behaviour Concepts Controversies Applications
ISBN: 978-0132310314
6th Canadian Edition
Authors: Nancy Langton, Stephen P. Robbins, Timothy A. Judge, Katherine Breward