I hope you can help me with the below exercise. I am trying to get through a programming class and it is getting tough,can you help?

The Daily Trumpet newspaper accepts classified advertisements in 15 categories such as Apartments for Rent and Pets for Sale. Develop the logic for a program that accepts classified advertising data, including category code (an integer 1 through 15) and number of words in the ad. Store these values in parallel arrays. Then sort the arrays so that records are in ascending order by category. The output lists each category, the number of ads in each category, and the total number of words in the ads in each category.

Recommended Answers

All 2 Replies

Hi, We cannot and will not help you with your assignment if you don't show us the efforts you already have made. Read the rules of this site below this page.

Rather than parallel arrays I would use an array of tuples, this way there is some connectivity during sorting.

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.