Create a class - constructor for a region

Assignment Help JAVA Programming
Reference no: EM131243802

Assignment - "Surveying app"

Aim

Often in real estate, surveyors are brought in to establish the exact size of properties and compare them against the deed to a property. This can then be used to determine where to set fences so that the fences sit on the boundaries between properties. For this assignment you will create an app to assist in surveying a property. Your app will allow someone to walk along the boundaries of a property or area and then display to them the perimeter and area of that property as well as given them an estimate of how much fencing would be required to border the area.

Background

Your team has been hired by Prop & Tee Pty Ltd, a British property development company based in London, UK. They are interested in expanding into Australia and Malaysia, however they don't yet have the appropriate resources in place. After speaking with their representative, Sir Vayer, you have learned that they are interested in having your team develop an app that can be used by contractors to easily size up a property; this would tell them how big it is as well as how much it would cost them to develop.

For the moment, they are interested in a proof of concept which can calculate the area, perimeter and estimate the amount of fencing necessary to border the property. If they are satisfied with this prototype, they will pay for a full version of the app to be developed (including things like the dimensions, elevation, calculation of expandable areas, look up of local zoning laws, etc.).

What you are provided with

We have made available a skeleton version of the app. The skeleton provides you with several HTML pages and associated JavaScript and CSS files representing the structure of the app. You will need to implement the logic and functionality for each of these pages as described below.

The app skeleton contains three web pages that utilise MDL for their interface:
- Regions List page (main index page)
- Record Region page
- View Region page

A "region" is a series of ordered corners bounding a polygonal area. We will assume this is a sensible shape, i.e., doesn't have crossings.

In the app skeleton, these pages are mostly blank and include sample entries only to demonstrate how to change from one page to another. You may modify these as you like, however you should not change the names of these files.

The app skeleton contains a displayMessage function you can use to display toast messages like in Assignment 1.

What you need to do

This assignment consists of multiple tasks, including programming, documentation, and use of software tools. For the programming tasks, we suggest you complete each step together as a team before moving onto the next one.

We strongly suggest you work on the programming tasks together as a team, or at least in pairs, rather than trying to split up the coding and attempting parts individually.

Getting started

1. One team member should create an "assignment2" directory with the necessary initial directory structure in your team Git repository by committing the provided skeleton code (see the Skeleton code and also the "Submission" section below).

2. One of your team members should set up an API key for Google Maps attached to a team Google account, if you didn't already obtain one as part of the Week 5 prac exercise.

3. Your team should read and discuss the list of required functionality below and create Asana tasks for the necessary features. You may need to think about and break these down into further subtasks.

4. Consider usability principles when designing the application interface and behaviour.

Required functionality

1. Create a class/constructor for a Region

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 constructor for 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.

2. Location tracking

On the Record Region page, the app should track and display the user's current location. Their position and the location accuracy should be displayed graphically on an interactive map.

This page should allow the user to repeatedly "add a corner" based on their current location as they walk 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.

The user should be prevented from adding a corner if the location accuracy is too low (e.g., the GeoLocation accuracy is greater than 10 metres).

You should also ensure that the users are given a method to reset the Region if they make a mistake.

Note:
- Ensure corners stored in a Region are instances of the google.maps.LatLng
class to allow you to use Google's geometry API.
- You can assume that the user visits each of the corners in order around the boundary of the Region.

3. 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 local storage and return the user to the Region List (index) page.

Note:
- Be sure that you store regions in such a way that you can retrieve all of your regions from local storage later.
- You may choose to allow the user to store a given Region with a nickname for easy identification later.

4. 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.

5. 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 return them to Region List (index) page.

6. 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:
- The Google Maps (spherical) geometry API provides useful functions; please see resources for documentation.
? computeDistanceBetween() - returns the distance between two
google.maps.LatLng class instances in metres.
? computeArea() - given an array of google.maps.LatLng instances, returns the area of the corresponding polygon in square metres.
- To use the geometry API you should add the "&libraries=geometry" to the query string to the URL used to load the Google Maps script. This is not always necessary but can cause errors in some circumstances if missing.
- 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.

7. 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.

For example a 14 metre side requires three fence posts along that side (excluding the corners). You can assume these three posts split the side into four equal spans and so are positioned 25%, 50%, and 75% of the way along the side.

When on the View Region page, the user should be given a way of toggling on and off the display of fence posts on the map (represented as dots positioned along the boundary).

Note:
- The Google Maps (spherical) geometry API provides useful functions; please see resources for documentation.
- computeDistanceBetween() - returns the distance between two
google.maps.LatLng class instances in metres
- interpolate() - returns a new google.maps.LatLng class instance representing the position between two specified google.maps.LatLng class instances based on a fraction of the distance between.
- If you choose, you may elect to allow the user to choose their own maximum distance between fence posts (instead of 4 metres) and have your app update the resulting post positions.

The programming tasks together are worth 10% of your unit mark. Feel free to modify or extend your app as you like, provided it has the required functionality. In particular, ensure you consider usability principles in designing the behaviour of the app.

Technical documentation

Your team should produce two short pieces of technical documentation for your app:
- A basic Project Management Plan. This is internal documentation detailing:
? Project aim and scope
? Team members, and their responsibilities
? How you are going to do the project, e.g., team meetings, minutes, handling communication of changes to the code
? Any other information you would want to give to a new team member
- A User Guide. This is external documentation detailing:
? How to get started using the app, with screenshots
? Any known bugs or limitations

Your team will be assessed based on the quality of these documents. This will be worth 9% of your mark for the unit.

Peer Assessment
You are expected to work together as a team on this assignment and contribute roughly equal amounts of work. Peer assessment will be conducted via the CATME online system. You will receive email reminders at the appropriate time.

CATME will open on the 16th of October 2016, and close on the 23rd of October 2016.

Not completing the CATME peer assessment component may result in a score of zero for the assignment.

Do:

- Give your teammates accurate and honest feedback for improvement
- Rate your teammates based on the criteria and on their contributions to the team and the assignment
- Leave a short comment at the end of the survey to justify your rating
- If there are issues/problems, raise them with your team early
- Contact your demonstrators if the problems cannot be solved amongst yourselves

Do NOT:
- Opt out of this process or give each person the same rating
- Rate your teammates based on how much you like them
- Make an agreement amongst your team to give the same range of mark

Reference no: EM131243802

Questions Cloud

Explore the role reading or writing played in your life : A literacy narrative may explore the role reading or writing played at some time in your life, or it may present a situation that needs to be resolved, such as Rose's placement in the vocational track
What level of excess reserves does the bank now have : The Third National Bank has reserves of $20,000 and checkable deposits of $100,000. The reserve ratio is 20 percent. Households deposit $5000 in currency into the bank that is added to reserves. What level of excess reserves does the bank now have..
Determining the common communication devices : What common communication devices are used in homes to connect to the internet and remote networks and what capabilities do these devices provide?
How has the reading on the work of this theorist changed : What do you think the reading tells us about society in general and social order in particular? What two to three points made by the social theorist did you find most interesting? In your own experience of living in society, can you relate to the poi..
Create a class - constructor for a region : The skeleton provides you with several HTML pages and associated JavaScript and CSS files representing the structure of the app. You will need to implement the logic and functionality for each of these pages - demonstrate how to change from one pag..
Electric connection between the rotating coil of wire : What is the name of the component which forms the electric connection between the rotating coil of wire and the external source of electrical energy?
Investigate the different modulation techniques : To find out more technical details about DSL, investigate the different modulation techniques that are used to transmit DSL signals. Although these techniques are quite complex, they are an interesting study in the technological advances necessar..
What is the reported level of significance : What is the value of the Between Groups degrees of freedom? What are the value for the Within Groups degrees of freedom? What is the reported level of significance? Based on the reported level of significance, would you reject the null hypothesis
Why are such panics highly unlikely today : Explain how the bank panics of 1930 to 1933 produced a decline in the nation's money supply. Why are such panics highly unlikely today?

Reviews

len1243802

10/15/2016 6:53:57 AM

R1.4) Adding corners to Region No attempt was made Clicking the "Add Corner" button adds the user's location to the recorded region ... and this works for multiple corners ... and each corner is added as a LatLng instance into an instance of the Region class ... and the region is displayed correctly on the map and updated as each corner is added ... and adding a corner is prevented if the accuracy distance is too large (>10m) ... and a warning is shown to the user in this case R1.5) Reset Region No attempt was made Clicking the reset button clears the recorded region ... and allows further recording of corners of a new region ... and it cleans up all map annotations related to prior recorded region R1.6) Save Region No attempt was made Clicking the "Save Region" button stores the region into the localStorage ... and adds this to existing regions (without clobbering existing regions) ... and finally returns the user to the Region List page

len1243802

10/15/2016 6:53:36 AM

R1.1) HTML Elements Page doesn't show anything Page displays the correct elements (at least the map and three required buttons) ... and interactive map is displayed correctly on the page 0 1-2 3 R1.2) Read position using GPS No attempt was made Position finding partially works (e.g., initial position is identified, but not rechecked) GeoLocation API is correctly used to watch the user's location ... and the map is repeatedly centred on the user's current position ... and their location is displayed correctly on the map. 0 1 2-3 4-5 6 R1.3) Account for location inaccuracy No attempt was made Location inaccuracy is shown in some way to the user (e.g., toast message or locatiob bubble) … and is continually updated as location changes 0 1-2 3

Write a Review

JAVA Programming Questions & Answers

  Write a functions that takes an array of doubles

1. Write a function that is passed a single integer and then calculates the factorial of that number. A factorial is the product of the integer times all of the integers below it stopping at 1. So n!= n*(n-1)*(n-2).......3.2.1

  Write a function that searches a [n][n] matrix

there is a y or multiple y values with a blank on one side (left/right or top bottom) and a x on the other

  What is the relationship between an exception and signaling

What is the relationship between an exception, signaling and an exception handler

  Advantage of a multilevel page table over

Suppose that a machine has 38-bit virtual addresses and 32-bit physical addresses. (a) What is the main advantage of a multilevel page table over a single-level one?

  Create your own green color for the leaves

Create your own green color for the leaves and display a solid green ellipse filled with your green color whose center is at the beginning of the drag and put a brown rectangle below it as the trunk of the tree.

  The api for this class ispublic void poweronnbsp sets the

the api for this class ispublic void poweronnbsp sets the machine ready to serve the selected ice creampublic void

  Square matrix of dimension

You are given a square matrix of dimension N. Let this matrix be called A. Your task is to rotate A in clockwise direction byS degrees, where S is angle of rotation. On the matrix, there will be 3 types of operations viz.

  Program that prints real solutions to the quadratic equation

Write a Java program that prints all real solutions to the quadratic equation ax^2 + bx + c = 0. Read in a, b, c and use the quadratic formula. If the discriminant (b^2 - 4ac) is negative, display a message stating that there are no real solutions..

  Implement a training system for company directors

Object Oriented Software Engineering (COMP2003) - You have been asked to design and implement a training system for company directors. In the best tradition of economics, we shall start by making things up.

  Write a method called sigma

Write a method called sigma that takes an int parameter n and returns the sum of all the integers from 1 to n (inclusive). For example, sigma(4) should return 10.

  Write down a java program that implements a stack of

write a java program which implements a stack of integers. an integer should only be pushed into the stack if it is

  Design a java application to carry out additions

You are to design a Java application to carry out additions and subtractions for numbers of any length - You are not allowed to convert these strings to numbers before the operation.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd