I have to write a program that reads in from a data file. Then, it is supposed to pick out the words of a certain length. Once it finds these words, it places the words in two lists. One lists contains the words and the number of occurrences sorted alphabetically, and the other list contains the same info just sorted my most occurrences. I am to use a node class which I can write anyway that I want. However, I am confused about how to write it. Can someone help me?

Recommended Answers

All 2 Replies

I have to write a program that reads in from a data file. Then, it is supposed to pick out the words of a certain length. Once it finds these words, it places the words in two lists. One lists contains the words and the number of occurrences sorted alphabetically, and the other list contains the same info just sorted my most occurrences. I am to use a node class which I can write anyway that I want. However, I am confused about how to write it. Can someone help me?

Somebody here can help you, I'm sure. In the meantime, what part are you confused about? Generally, if you try to "get cracking" on at least part of the project, somebody around here might be able to stir your thinking, or give you some pointers.

Even if you don't know how to code what you're asking about, try and explain the process/algorithm you're thinking about implementing. That way, even if we don't help you with a single line of code, we might be able to help with your design of the program.

What I don't understand is how we use the nodes. I am guessing that each words is a new node. Therefore, should I read in each word, make each one a node, then allocate new space for the next node and so forth. Then, send the linked nodes to the list classes to be sorted accordingly?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.