Problem 1 and 2: TextImprover (20 pts)
There are some words that people tend to overuse when writing documents, such as "amazing," "literally," "actually," "absolutely," etc. For this problem, you will implement a class that searches for overused words and replaces them with better choices.
Implement a classTextImproverthat provides a method for improving the text in a text file (let's call it the "input file") by replacing overused words with better choices of words, based on another text file (let's call it "word map") that maps overused words to non-overused words.
Use this template:TextImprover.javaDownload TextImprover.java
A few notes:
Problem 3: Student (10 pts)
Given aStudentclass (Student.javaDownload Student.java), modify the class to throw anIllegalArgumentExceptionunder the following two conditions:
Problem 4: Product and ProductDB(10 pts)
Robert recently went into business for himself with a pet store! However, he spends so much time sleeping on his couch that he is unaware of modern technology. So in his store, they keep all the data about their products in a text file.
Each line in this text file contains the following, separated by semicolons:
Sample file here:products.txtDownload products.txt
Implement a classProductthat is represented by a name, price, and quantity. Use this template:Product.javaDownload Product.java
Also implement a classProductDBthat reads in data from a text file and provides methods for searching and adding products. Use this template:ProductDB.javaDownload ProductDB.java
You must catch anyFileNotFoundExceptionthat is thrown and print out a message in the format: "File: [filename] not found", e.g.,File: products1.txt not found
Problem 5: BankAccount and Bank (10 pts)
Implement a classBankAccountthat is represented with an account number and balance. Use this template:BankAccount.javaDownload BankAccount.java
Also implement a classBankthat contains a number of bank accounts, read from a file, and provides a method for returning the account with the lowest balance. Use this template:Bank.javaDownload Bank.java
TheBankclass must read a file with the format of these sample files:accounts1.datDownload accounts1.dataccounts2.datDownload accounts2.dataccounts3.datDownload accounts3.dataccounts4.datDownload accounts4.dat
Namely, the format is:
You can assume that all input files are in the correct format.
You must catch anyFileNotFoundExceptionthat is thrown and print out a message in the format: "File: [filename] not found", e.g.,File: accounts1.dat not found
Part B:
Problems 6-10: Email (50 pts)
Implement a simple e-mail messaging system. A message has a recipient, a sender, and a message text. A mailbox can store messages. Each user has a mailbox.
Your program will take four commands: Log in, log out, send, read, and quit. When logging in, the program will ask for just a username. When asking to send a message, the program will ask for the recipient's username and the test of the message. When asking to read messages, the system will display all of the user's messages.
The driver / user interface class for the email system, EmailUI, has already been implemented as is given here:EmailUI.javaDownload EmailUI.java. Your task is to implement the Message, Mailbox, and MessagingSystem classes, using these templates:Message.javaDownload Message.java,Mailbox.javaDownload Mailbox.java,MessagingSystem.javaDownload MessagingSystem.java.Notice the templates have more details about each class.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here