Explanation of Solution
Given: The weblog-analyzer project with LogAnalyzer class, analyzeHourlyDataas well as printHourlyCounts methods.
To find:Â The busiest times of the day.
Solution:
The busiest times of the day is 18 as it has the maximum count which is 237.
Right click on the LogAnalyzer class and click on new LogAnalyzer() to create an object.
After that, a new box will pop out in which the user can rename the reference name of the object, then click on the ok button.
A new rectangular box will occur at the bottom of the BlueJ window.
After that, right click on the rectangular box, and then click on analyzeHourlyData() to invoke analyzeHourlyData method.
After that, click on the printHourlyCounts() to invoke the printHourlyCounts method.
After invoking the method, a new window will pop out where the user can analyse the busiest time of the day.
Hence, the busiest time of the day is 18.
Want to see more full solutions like this?
Chapter 7 Solutions
EBK OBJECTS FIRST WITH JAVA
- Add a method to the Parking Office to return the collection of permit ids for a specific customer (getPermitIds(Customer)) I have already coded the permit id class, but I attached the class diagram for you to see. Current Java Code: package parkingsystem4;import java.util.LinkedList;import java.util.List; public class ParkingOffice { String name; String address; List<Car> cars = new LinkedList<Car>(); List<Customer> customers = new LinkedList<Customer>(); List<ParkingLot> lots = new LinkedList<ParkingLot>(); List<ParkingCharge> charges = new LinkedList<ParkingCharge>(); // Default constructor ParkingOffice(){ } // Parameterized constructor ParkingOffice(String name, String address, List<Car> parkedCars, List<ParkingLot> lots, List<ParkingCharge> charges){ this.name = name; this.address = address; this.cars = parkedCars; this.lots = lots;…arrow_forwardUse the debugger to examine the clock-display project. Set breakpoints in the ClockDisplay constructor and each of the methods, and then singlestep through them. How do you feel about the way it's behaving? Have you gained any fresh insights as a result of this? If this is the case, what exactly were they?arrow_forwardImplement the "paint fill"feature seen in several picture editing products.To put it another way, if you have a screen (represented by a two-dimensional array of colours), a point, and a new colour, Fill in the surrounding area until the colour shifts away from the original.arrow_forward
- Modify the GeometricObject classto implement the Comparable interface and define a static max method in theGeometricObject class for finding the larger of two GeometricObject objects.Draw the UML diagram and implement the new GeometricObject class. Writea test program that uses the max method to find the larger of two circles, the largerof two rectangles.arrow_forwardJust what does it imply when people talk about a "Regular Expression"? We have to ask ourselves why we did it. Specifically, what are the main dissimilarities between a descriptive method and a regular expression? Could you be more detailed, please?arrow_forwardIf a class implements the Comparable interface, it is easy to swap in/out different strategies for comparing objects of that class. For example, if our Shapes implement Comparable and provide a compareTo() that compares areas, we can provide another compareTo() override for those shapes that compares perimeter. Group of answer choices True Falsearrow_forward
- Write a client programs that use your edge-weighted digraph to produce edge-weighted digraphs that have a large percentage of negative weights but have at most a few negative cycles, for as large a range of values of V and E as possible.arrow_forwardWhat is encapsulation?Clarify with help of example?arrow_forwardImplement an ST client FullLookupCSV that builds an array of ST objects (one for each field), with a test client that allows the user to specify thekey and value fields in each query.arrow_forward
- What is a HashMap? What is its purpose and how do you use it? Answer these questions in writing, and use the Java library documentation of Map and HashMap for your responses. Note that you will find it hard to understand everything, as the documentation for these classes is not very good. We will discuss the details later in this chapter, but see what you can find out on your own before reading on.arrow_forwardImplement a test client that enables the user to specify the key and value fields in each query, along with a ST client FullLookupCSV that creates an array of ST objects (one for each field).arrow_forwardIs it possible to replace the ArrayList of Student in the Course Class with a HashSet collection and why? If yes, show a screenshot of the implementation. (You should explain in your own words the answerarrow_forward
- 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