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 method called hash midpoint

Write a method called hasMidpoint that accepts three integers as parameters and returns 'true' if one of the integers is the midpoint between the other two integers; that is to is if one integer is exactly between the two others. The method should re..

  Java program- displays all the details of stations

Write a Java program called codes. java that, firstly, prompts (asks) the user to enter an input file name. This is the name of a text file that can contain any number of records.

  Use loops in the "equals" method to reduce the fractions

The equals method modification should loop repeatedly until the user decides to quit. Inside the body of the loop, the programshould allow the user to enter a target fraction into an anonymous object and learn whether the fractions are identical.

  A regular polygon is an n-sided polygon

A regular polygon is an n-sided polygon in which all sides are of the same length and all angles have the same degree(i.e the polygon is both equilateral and equiangular).

  What about percent values and currencies

List three debugging techniques, within the debugger, that can be used to locate logical error in the Java code. For each of these tools, explain what purpose it serves, and how it relates to the debugging process.

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  How many parameters are supposed to be passed

How many parameters are supposed to be passed to the constructor or how big to create the array - Method Union comparing two different objects?

  Develop java package comprising of class using encapsulation

Develop the Java package comprising of Class and Student with the given requirements. Encapsulation, Method to print student details alone.

  Develop a web-based application the server-side part of

develop a web-based application. the server-side part of the application must be developed using java servlets

  Multi-threading concepts

Multi-threading concepts: What is the output of the following program? class Threading{

  How do i automatically set the input focus in my applet

How do I automatically set the input focus in my applet to a specific component/text field when the browser loads the page that contains the applet?

  Type i and type ii virtualizations

Compare and contrast at least two (2) similarities and two (2) differences between Type I and Type II virtualizations. Using your comparison, choose either a Type I or Type II virtualization and determine a specific networking scenario in which yo..

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