U3F1ZWV6ZTUwMjQyMDg4NzA2MDg4X0ZyZWUzMTY5NzA1NDAzMjU3Mg==

java programming arrays, lists and structured data week 3quiz answers

 week 3:


This is java programming arrays, lists and structured data week 3 quiz answers. you will not need any other answers to solve this java programing questions.

You need to know about this java programming course that make you good in learning how to make arrays, lists and structured(object) of data.

1. Question 1 Suppose a web log is modified to now have a sixth piece of information, a priority, that can be represented as a String.
Which one of the following is the least likely change to the LogEntry class to accommodate this new part of a web log?

the answer is here:

The toString method is modified to include a String parameter.
2. Question 2
Consider the following code for the readFile method of the LogAnalyzer class.
public void readFile(String filename) {
FileResource fr = new FileResource(filename);
for (String line : fr.lines()) {
LogEntry le = WebLogParser.parseEntry(line);
}
}
In the Tester class, readFile is called with a correct filename, and then printAll is called, but nothing is printed.
Which one of the following is likely the best reason why?

the answer is here:

In readFile, the log entries were not stored in records.
3. Question 3
Consider the following code for the method printAllHigherThanNum with one integer parameter num. This method should print all the logs that have a status code higher than num.
Which one of the following would be the best choice for suitable code for this method?

the answer is here:

for (LogEntry le : records) {
if (le.getStatusCode() > num) {
System.out.println(le);
}
}

4. Question 4
Run the method countUniqueIPs on the file weblog2_log.
How many unique IP addresses are in the file?

the answer is here:

45
5. Question 5
Run the method uniqueIPVisitsOnDay(“Sep 27”) on the file weblog2_log.
What size is the ArrayList that is returned?

the answer is here:

8
6. Question 6
Run the method countUniqueIPsInRange(400,499) on the file weblog2_log.
What number is returned?

the answer is here:

23
7. Question 7
Run the method mostNumberVisitsByIP after a HashMap has been created from the method countVisitsPerIP on the file weblog2_log.
What number is returned?

the answer is here:

63
8. Question 8
Run the method iPsMostVisits after a HashMap has been created from the method countVisitsPerIP on the file weblog2_log.
What single IP address is returned in the ArrayList?

the answer is here:

188.162.84.63
9. Question 9
Run the method dayWithMostIPVisits with a HashMap has been created from the method iPsForDays on the file weblog2_log.
What day is returned?

the answer is here:

Sep 24

10. Question 10
Run the method iPsWithMostVisitsOnDay with two parameters—one, a HashMap that has been created from the method iPsForDays on the file weblog2_log and two, the day “Sep 29”.
One IP address is returned in the ArrayList—what is it?

the answer is here:

212.128.74.248





introduction...

About this Course

Build on the software engineering skills you learned in “Java Programming Solving Problems with Software” by learning new data structures. Use these data structures to build more complex programs that use Java’s object-oriented features. At the end of the course you will write an encryption program and a program to break your encryption algorithm.

After completing this course, you will be able to:

help you to practice your skills in structured data(arrays, lists and objects) by doing some quiz by week, you need to answer to pass this course. size of program doesn't matter or what type of coding, you just need to know how the language work and what fundamentals do you need to learn to act with it. arrays, lists and structured data are using in many fields. structure need to be built with some data, arraylists, arrays and lists to make a useful program that can be used. testing yourself with quiz or exam, study uploaded chapter and make interview to make sure you can finally work with real world problem, and applying for job(javascript, html, stack, css, csv .....). work with all items, method and class in hours to make good work 1. Read and write data from/to files in ordered list. 2. Solve real world problems involving data files. 3. Perform quantitative analyses of structured data (e.g., finding maximums, minimums, averages). 4. Store and manipulate data in an array or Array List. 5. Combine multiple classes and objects to solve larger problems. 6. Use iterables and collections (including maps) in Java.

some task you will learn to solve anther time java programming graph needed to wright with coding. anther courses help you explore high level tools to make development and help any web site developed by adding new features. and computer science is very enjoyable capturing various information, it's like university to you help you practice getting natural job. you can look or search about java programing, and you can choose to start today or not developing android, but you have to make correct decision and discover projects (written specialization, designed content).

and now with this course you will begin to learn object oriented language.


some reviews:

-Actually, before I start this course I had not a good idea about OOP concept such as constructors, HashMap.now I have fair confidence about that. thank you duke university making such an arrangement. 

-Good and practical training approach to solve real worlds problems. Assignments and quizzes are quite challenging and interesting. Greatly motivates us towards programming and problem solving skills.

-The course was pretty challenging (and occasionally frustrating) for a novice programmer, but doable.\n\nI enjoyed the course, and came away with a greater understanding of computers and programming.

-The programming exercises are really interesting! They make programming much more fun to study. The lecturers are all great and the lessons are engaging. Enjoyed it greatly! Thank you Duke.

تعديل المشاركة
author-img

Steven Hany

hey I'm Steven, I studied Programming Foundations with JavaScript, HTML and CSS, Java Programming: Solving Problems with Software, Java Programming: Arrays, Lists, and Structured Data and Java Programming: Principles of Software Design, Java Programming: Build a Recommendation System ... And here is some answers
Comments
No comments
Post a Comment

Post a Comment

Leave a message

NameEmailMessage