Advanced Programming | Reliable Papers

School of Computing & Information TechnologyCSCI251 Advanced ProgrammingAutumn 2021Assignment 3 (Worth 8%)Due 11:55pm Sunday 4th June 2021. (End of Week Thirteen)This assignment involves a Monitor class to monitor users’ behaviour.General notes1. Your assignment should be carefully organised with the same kind of expectations as the previousassignments.2. Please provide your compilation notes in README file, to detail your OS or compiler version.3. Other than the initial command line input, the program should run without any other user input(s).User behaviourAs a network infrasturcture manager, you need to monitor users’ webpage-browsing behaviour. Assumethat the user’s browsing activies can be presented by a sequence of digits (say ‘‘0 1 0 1 1’’, where 0represetns the url link youtube.com and 1 for uow.edu.au). We want to find out how many differentwebsites (digits) the user visit before. Alternatively, we also want to know the browsing difference betweentwo users.You are to write a Monitor class and the main function to support and demonstrate the functionalityrequired here. Your program should compile to Monitor and run as:./Monitor digit user• digit : A positive integer. The number of websites for one user.• user : A positive integer. The number of users we are going to monitor.ContainersYou are to implement two containers:• A User container for storing their browsing history (as digits).• A Pool container containing a collection of Users.1Digits as urlsNote that in this assignment we are using digits to represent different website urls (say 0 represetns theurl link youtube.com or 1 for uow.edu.au).You are to write a function Urlgeneration allows us to generate a number (from 0-9), as the users’browsing history. This should be done as a random generation.UsersThis container should be used to store users’ browsing history (a collection of digits/urls). It should be atemplated container class. The following methods should also be provided.• Variety: This method should determine the number of distinct digits from the user. For example,one user has the following browsing sequence: 1 2 1 3 7 8 9. In this case, this sequence has 6different digits, so that Variety = 6.• Difference: This method should take another user to compare. The result is the element-wisedifference from two users. For instance, the difference between the browsing sequence 1 2 3 and 14 5 is 2:1 2 3(vs) 1 4 5(result:) 0 1 1 ====> 2PoolThis container should be used to store collections of users. It should be a templated container class. Thefollowing methods should be provided.• Display This method should should display all users with their digits (urls);• minimumVariety This method should determine the minimum Variety across all users;• minimumDifference This method should determine the minimum Difference across all users;Example./Monitor 5 3As digit = 5 and user = 3, so you should generate activities for 3 users. Each user has 5 digits torepresent what they used to browse before. The display function is used to print out all users with theirdigits (the following sequence should be generated randomly):21 2 1 3 5 => this is for the 1st user1 1 1 3 7 => this is for the 2nd user1 1 1 3 0 => this is for the 3rd userNote that the 1st user is with Variety = 4, 2nd user is with Variety = 3, and the 3rd user with Variety =3. As such, we have minimumVariety = min(4,3,3) = 3;In addition, for 1st and 2nd user, we have:1 2 1 3 5(vs) 1 1 1 3 7=> 0 1 0 0 1 => 2for 1st and 3rd user, we have:1 2 1 3 5(vs) 1 1 1 3 0=> 0 1 0 0 1 => 2for 2nd and 3rd user, we have:1 1 1 3 7(vs) 1 1 1 3 0=> 0 0 0 0 1 => 1As such, we have minimumDifference = min(2,2,1) = 1;3