Question: Data structures and introduction to algorithm College of Engineering Department of Communications and Computer Engineering Data Structures and Introduction to Algorithm (Java) HashSets and HashMaps
College of Engineering Department of Communications and Computer Engineering Data Structures and Introduction to Algorithm (Java) HashSets and HashMaps (Project 6) Write a program that reads a Java source code file and outputs a list of all identifiers (that is, variable names but not keywords, not found in comments or string constants) in alphabetical order. Each identifier should be output with a list of line numbers on which it occurs. Notice that your code should make use of hashing. Input sample 2 public class ProjectSExample f 3 private int x;//x is a private variable private int ase; public ProjectSExample/x is used here System.out printin(x+a): 6 2 9 1e 11 public static void main(Stringl] args) f 12 13 1000 Auto generated method stub 14 15 Output: (args): (11 (x): 13, 6. 6.6,7
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
