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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 19:00, Albertrami9019
Jill wants to become a network professional. which certification would be useful for her? a. mcse b. pmp c. comptia a+ d. ccie
Answers: 2
image
Computers and Technology, 22.06.2019 11:40, malibu777
Design a pos circuit that displays the letters a through j on a seven-segment indicator. the circuit has four inputs w, x, y, and z which represent the last 4 bits of the uppercase ascii code for the letter to be displayed. thus, if wxyz = 0001 then "a" will be displayed. (any answer with 22 or fewer gates and inverters, not counting any for the inputs, is acceptable)
Answers: 2
image
Computers and Technology, 22.06.2019 20:40, broang23
Write a program that begins by reading in a series of positive integers on a single line of input and then computes and prints the product of those integers. integers are accepted and multiplied until the user enters an integer less than 1. this final number is not part of the product. then, the program prints the product. if the first entered number is negative or 0, the program must print “bad input.” and terminate immediately. next, the program determines and prints the prime factorization of the product, listing the factors in increasing order. if a prime number is not a factor of the product, then it
Answers: 2
image
Computers and Technology, 23.06.2019 00:00, brooklyn4932
What engine component is shown in the above figure?
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 in other subjects:

Konu
History, 16.04.2021 04:50