subject

Basically, you will run your program as this: java wc your program should count the number of lines and the number of times each word/character is used. a word can be either an identifier or a number. • an identifier is defined as a letter followed by a sequence of letters or digits ('a'..'z', 'a'..'z', or '0'..'9'). identifiers are case insensitive ("aa00", "aa00", "aa00", and "aa00" are the same). identifiers are separated by non-letter and non-digit characters. • a number is defined as a sequence of digits ('0'..'9') that are not in an identifier. different sequences represent different numbers. for example, number "001" is different from number "1". numbers are separated by identifiers or non-letter and non-digit characters. it should first output the number of lines, words, and characters. after that, it should output the five most used characters, the five most used numbers, and the five most used identifiers as well as the number of times these characters/numbers/identifiers are used. since identifiers are case insensitive, the program only outputs identifiers with lower case letters. the characters, numbers and identifiers should be output in the descending order based on the number of times they are used. when two characters happen the same number of times, the character with a smaller unicode value should be considered as being used more frequently. when two identifiers/numbers happen the same number of times, the identifier/number that occurs earlier in the file should be considered as being used more frequently. when printing characters, invisible ones should be output in unicode value, except for tab ‘\t’ and newline ‘\n’. try to create your own data structures to keep the information, and do not directly use standard java collections. inefficient implementations are surely ok (no points will be docked), so that later you may appreciate the use of these collections more.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:30
Jenny wants to look at row 345 and compare it to row 17. what can she do if she wanted to easily adjust to see both at once?
Answers: 3
question
Computers and Technology, 22.06.2019 19:50
Write a car class having two private member variables called tank and speed. write public methods called pumpgas and gofast. the method pumpgas gets an integer for gas that must be pumped. that value needs to be added to tank (no more than 20 gallons). it must return the amount of gas that is purchased ($4 per gallon). the method gofast should increase the speed by 5 each time it is called.write a constructor for the above class that initialized both variables to zero.write a tostring to display both the tank and speed when the car is printed.modify the car class to implement the interface comparable and an interface called carinter having the public methods in carinter.write the main program to create an array of size 5 of type car. create 5 car objects having each location of the array to refer to one of the cars. test the pumpgas, gofast, equals method on the array items. write an enhanced loop to print all the car values (using a tostring written last time).write a generic method to find the minimum of four items. pass int, double, char, string and car objects to test this method.
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
You are consulting for a beverage distributor who is interested in determining the benefits it could achieve from implementing new information systems. what will you advise as the first step?
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
You need a quick answer from a coworker. the most effective way to reach your coworker is through a. cloud server b. instant message c. teleconference d. telepresence
Answers: 1
You know the right answer?
Basically, you will run your program as this: java wc your program should count the number of lines...
Questions
question
Spanish, 23.10.2020 18:40
question
Mathematics, 23.10.2020 18:40