Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
6th Edition
ISBN: 9780134477367
Author: David J. Barnes, Michael Kolling
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 7, Problem 12E
Modify the LogAnalyzer class so that it has a constructor that can take the name of the log file to be analyzed. Have this constructor pass the file name to the constructor of the LogfileReader class. Use the LogfileCreator class to create your own file of random log entries, and analyze the data.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
It is time for you to demonstrate your skills in a project of your own choice. You must DESIGN,ANALYSE AND CODE any method for the GENERIC MyLinkedList class that will manipulate the linkedlist. You can decide yourself what it should be following the specification below:1. Purpose: The method must make logical sense – it should be of some purpose to somebody.You should describe in the text who will use the method for which purpose.2. Clearly explain the problem. Then clearly explain how your method will solve it.3. Test program: Test the method using a wrapped class like Integer however, you will get extramarks if you can test it with the new classes you created in I_Do1 and I_Do2.
It is time for you to demonstrate your skills in a project of your own choice. You must DESIGN,ANALYSE AND CODE any method for the GENERIC MyLinkedList class that will manipulate the linkedlist. You can decide yourself what it should be following the specification below:1. Purpose: The method must make logical sense – it should be of some purpose to somebody.You should describe in the text who will use the method for which purpose.2. Clearly explain the problem. Then clearly explain how your method will solve it
implement a database about people, they could be made up, but you want to include a sizable number, maybe 10-20. The data that you store for each person must include a name and at least one additional piece of information, such as a birthday. You can assume that the names are unique. The database should enable you to enter, remove, modify, or search this data. You also should be able to save the data in a file for use later.
Define a class Person to represent a person and another one to represent the database. A dictionary should be a data member of the database class, with Person objects as search keys for this dictionary. Write a program that tests and demonstrates your database.
Chapter 7 Solutions
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
Ch. 7 - Prob. 1ECh. 7 - Prob. 2ECh. 7 - Read through the LogAnalyzer class and identify...Ch. 7 - Modify the LogAnalyzer class so that it has a...Ch. 7 - Prob. 14ECh. 7 - Add a method busiestHour to LogAnalyzer that...Ch. 7 - Add a method quietestHour to LogAnalyzer that...Ch. 7 - Prob. 18ECh. 7 - Prob. 34E
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Let's finish working on our booking system. The last part for our booking system will be to manage multiple flights. To do this, we'll modify our program's command list. The command "create [id] [cap]" will try to create a new empty flight with ID [id] and capacity [cap]. The command "delete [id]" will try to remove the flight with ID [id]. The command "add [id] [n]" will try to add n reservations to the flight with ID [id]. The command "cancel [id] [n]" will try to cancel n reservations from the flight with ID [id]. If an operation fails for any reason, the program will issue the message "Cannot perform this operation". You can add a more helpful message to identify why the operation failed. The command "quit" will stop the execution of the program. For the sake of simplicty, let's limit the maximum number of handled flights to ten. Use the code from your previous exercise as a starting point. Note that we need to add an access method to the flight id field. PLS ANSWER…arrow_forwardMake a telephone lookup program. Read a data set of 1,000 names and telephone numbers from a file that contains the numbers in random order. Handle lookups by name and also reverse lookups by phone number. Use a binary search for both lookups. This assignment needs a resource class and a driver class. The resource class and the driver class will be in two separate files. The resource class will contain all of the methods and the driver class only needs to call the methods. The driver class needs to have only 5 lines of code. The code needs to be written in Java. Please help me with exactly what I asked for help.arrow_forwardThe Stock of the book needs to be updated correspondingly after a customer has made an order, or a customer has cancelled an order. It can be accomplished by using trigger. You are asked to implement a trigger which needs to take following into consideration: a. The trigger needs to be fired after a new row has been inserted into table Orders, or after a row has been deleted from table Orders which indicates an order has been cancelledb. Each order may contain multiple books in ORDERTITEMS table You also need to write SQL statement or/and PL/SQL code to demonstrate that the implemented trigger accomplishes the business logicarrow_forward
- For this task you will need to implement a Guesses class, which will store all of the locations that a player has targeted/guessed so far. Again, the included Runner class is provided purely so you can manually debug your code by hitting the Run button and observing the results. It is not included in any tests, so feel free to make any changes you like to it. Your workspace for this task includes a compiled Cell class, that has been implemented according to the specification described in Part 1. Specification We have started you off with the skeleton of the Guesses class. Your task is to complete this class so that it has the following methods: A constructor that accepts no parameters, and results in a new instance of Guesses being created. An addGuess method, which accepts an instance of Cell, and returns nothing. Calling this method should result in this instance of Guesses remembering that the given location has been guessed. An isGuessed method, which accepts an instance of Cell,…arrow_forwardPart 2: Sorting the WorkOrders via dates Another error that will still be showing is that there is not Comparable/compareTo() method setup on the WorkOrder class file. That is something you need to fix and code. Implement the use of the Comparable interface and add the compareTo() method to the WorkOrder class. The compareTo() method will take a little work here. We are going to compare via the date of the work order. The dates of the WorkOrder are saved in a MM-DD-YYYY format. There is a dash '-' in between each part of the date. You will need to split both the current object's date and the date sent through the compareTo() parameters. You will have three things to compare against. You first need to check the year. If the years are the same value then you need to go another step to check the months, otherwise you compare them with less than or greater than and return the corresponding value. If you have to check the months it would be the same for years. If the months are the same you…arrow_forwardAnswer the given question with a proper explanation and step-by-step solution. USING JAVA: ---Sorting the Invoices via dates--- Another error that will still be showing is that there is not Comparable/compareTo() method setup on the Invoice class file. That is something you need to fix and code. Implement the use of the Comparable interface and add the compareTo() method to the Invoice class. The compareTo() method will take a little work here. We are going to compare via the date of the invoice. The dates of the Invoice class are by default saved in a MM-DD-YYYY format. So they have a dash '-' between each part of the date. So you will need to split the date of the current invoice AND split the date of the object sent to the method. We have three things to compare against here. First we need to check the year. If the years are the same then you should go another step forward and compare the months. If the months are the same then you will lastly have to compare the day. Use whatever…arrow_forward
- Implement the Plates class buildMap function so that it populates the HashMap with the state abbreviations as keys and the counts of how many each appear in the file as values. Sometimes, the parking attendant will add special notation to help her remember something about a specific entry. There are just non alphabetic characters that she adds to the state - your program should ignore these characters so that an entry like NY* still counts toward the NY plate count. She is also very inconsistent with how she enters the plates. Sometimes she uses upper case, sometimes lowercase, and sometimes she even uses a mix. Be sure to account for this in your program. Only add information for plates in New England (Maine, New Hampshire, Vermont, Massachusetts, Rhode Island, and Connecticut). Plates.java import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; public class Plates { private Map<String, Integer> plateMap;…arrow_forwardChoose an enterprise and do a business description of it. 1-2 pages. Create all classes for entities. All classes must have at least a constructor, get and set methods for all private variables and a toString method. Create classes also for connection entities (e.g. orders, reservations, etc.) All information should be saved in files. When opening the program, all information from files must be loaded in array lists. Use an array list for every class. The program must have at least one menu where the user can choose the operations to work. You should at least have one class that inherits from another class. You should have at least one interface that is extended by at least 2 classes. You must use the interface methods in your program. You are allowed to use the GUI for this project. If not use JOptionPane You are allowed to use databases, instead of files.arrow_forwardDesign and implement an insertSorted() method for the MyArrayList class. The method should receive a single object and insert it in its correct position. You can assume that the calling array is already in a sorted order. The calling array is therefore updated. Follow the three step method for designing the method. Develop the java code for the method. Create a test program to test the method thoroughly using the Integer wrapper class.arrow_forward
- shows the UserManagement class that contains the main methodof our program. It creates and adds several users, allows the user to search forthem interactively, and then prints all of the users in the collection.arrow_forwardWhy not create a single Collection data type that includes methods to add items, remove most recently inserted items, remove least recently inserted items, remove random items, iterate, return the collection's item count, and any other actions we might need? Then we could build each one in a single class that many clients could use. ans in 10 minarrow_forwardAdd a toString() method to Fraction class that returns the fraction as aString in the form "x / y", where x and y are numerator and denominatorrespectively. As the method does not do any display itself, the output can be done by a client program that calls the method in an output statement. Use client program to test this functionality; i.e. provide an output statement to display a fraction as its String representation. class Fraction2{private int n, d;public Fraction(){this.n = this.d = 0; //Initialize the values}public Fraction(int n, int d){this.n = n; //Initialize the variablesthis.d = d;}//Define the getter function getNum() that returns the numeratorpublic int getNum(){//Returns numeratorreturn n;} //Define the getter function getDen() that returns the denominatorpublic int getDen(){//Returns denominatorreturn d;}//Define the boolean function isZero() that returns 0 if numerator is 0 and denominator is not equals to zeropublic boolean isZero(){return(getNum() == 0 &&…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Files & File Systems: Crash Course Computer Science #20; Author: CrashCourse;https://www.youtube.com/watch?v=KN8YgJnShPM;License: Standard YouTube License, CC-BY
UNIX Programming (Part - 10) The File System (Directories and Files Names); Author: ITUTEES;https://www.youtube.com/watch?v=K35faWBhzrw;License: Standard Youtube License