Highlights
Task:
Programming tasks
The Programming component of this assignment is worth 12% of your overall unit mark.
For the programming tasks, we suggest you begin by discussing how all the features come together for the app to work before you begin coding.
Feature 1: Region class
The app will allow the user to record several different regions and calculate some information for these. This means it will be necessary to be able to distinguish them from one another. Create a Region class which will have several private attributes: an array of corner locations, the date (and time) the region was saved, and any other necessary information and methods.
Class creation is covered in Week 5
Feature 2: RegionList class
Create a RegionList class which will have several private attributes: an array of instances of the Region class, a count of the number of regions in the region list and methods to add, get or remove regions from the region list as well as getting the number of regions in the list. Class creation is covered in Week 5. To understand the relationship between a Region and a
RegionList, refer to the Week 5 lab.
Feature 3: Go to location
On the Record Region page, you should use the MapBox API to display a map on the page.You should also allow the user to click on the map to register their current location. Once the user has picked a location, they should be allowed to repeatedly “add a corner” for the perimeter of an area. These corners will form a new Region. As the user adds corners, they should be able to see the updated region polygon displayed on the map.
You should also ensure that the users are given a method to reset the Region if they make a mistake.
The following link will help you determine the location of the mouse: https://docs.mapbox.com/mapbox-gl-js/example/mouse-position/ The MapBox API is covered in the Week 5 Lab.
Note:
? You can assume that the user visits each of the corners in order around the boundary of the Region.
Feature 4: Persistent storage of Region instances
The Record Region page should provide the user the ability to save the new region once they have finished recording the corners. This should store the region in the current instance of the RegionList class and store this in local storage and return the user to the Region List (index) page.
The region must have at least 3 corners before it can be saved, this should be validated properly.
Note:
? Be sure that you store regions in such a way that you can retrieve all of your regions from local storage later as an instance of the RegionList class.
? You may choose to allow the user to store a given Region with a nickname for easy identification later. Saving and loading is covered in Week 7.
Feature 5: Showing a list of Regions
Once you have one or more Region instances stored in local storage, you should modify the Region List (index) page so that it displays a list of Regions that can be viewed. This list should be generated from information in local storage and should include the date/time when the region was recorded (and any other information you would like to display). Clicking on an entry in the list should cause the app to navigate to the View Region page and show that Region.
Note: These regions should be contained within an instance of the RegionList class. Saving and loading is covered in Week 7.
Feature 6: Viewing a Region
When the user views an existing region via the View Region page, the app should display the region on an interactive map.
This page should provide the user a method to remove that Region, which will remove the Region from local storage and the relevant RegionList instance before returning the user to the
Region List (index) page.
Feature 7: Region area and perimeter
You should add methods to the Region class which calculate and return the area and perimeter of the region. Update the View Region page to display this information.
Note:
? You will need to add the following script tag to each of your HTML files
<script type="text/javascript"
src="https://geographiclib.sourceforge.io/scripts/geographiclib.min.js" > </script>
Then create an instance of the geodesic class in your shared.js file using the code below let geod = GeographicLib.Geodesic.WGS84;
This will allow you access to the GeographicLib library.
? Geographiclib allows for calculation of perimeters and areas via the PolygonArea class
? For more information see: https://geographiclib.sourceforge.io/1.49/js/module- GeographicLib_PolygonArea.PolygonArea.html
? Ensure that you correctly create Region class instances when loading Regions from local storage, so that you can use these methods from the View Region page.
Feature 8: Calculating fencing required
Add one more method to the Region class to return an array of fence post locations, named boundaryFencePosts. You can assume that fence posts should be spaced at most every 4 metres, equally along each side of the boundary polygon with a fence post at each corner.
This IT Assignment has been solved by our IT Experts at onlineassignmentbank. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.