Plotting some pois on a graph

Assignment Help JAVA Programming
Reference no: EM13847420

Task 1 (60 marks) (plotting some POIs on a graph/map)

  • Part 1: Several types of point of interests (POI) such as - (1) Petrol station, (2) Taxi Stand, (3) ATM, (4) Hospital and (5) Shopping centre are located in a city. Their locations (longitude and latitude) are provided in a text file (a file will be provided in the resource section of the subject site, or you can create your own dummy text file according to the format you prefer). You must work with at least two type/kind of POI and at least 20 samples for each type (e.g. your text file should contain the location of 20 petrol stations in a city). You have to write a JAVA program that would get the locations of all the POIs from the file and plot them on a map (graph). Optional: Save the map/graph in a file if the user wants to.
  • Part 2: incorporate a mechanism to zoom in/out the map either by having buttons or with the help of the scroll button.


Task 2 (40 marks) (a square inherits a rectangle)

Assume a rectangle as depicted in the diagram bellow. Notice its specifications.  

The diagram shows a class Rectangle. An object of this class represents a shape which has two sides (base and height). These two sides should be kept in private to avoid misuse and set to zero when a rectangle object is first created. There should be a function to set the value of these two sides. Another function should calculate the area (base * height) of the rectangle.

Part 1 (rectangle):

  • Write a JAVA source code, to declare the Rectangle class considering above mentioned specifications.
  • Write, in JAVA, the complete definition of the Rectangle class based on your declaration
  • Write a fragment of client code which creates a Rectangle object, sets its base and height value to 8 and 6 respectively and 
  • displays its area.

Part 2 (square):

Assume a Square class which would inherit the Rectangle defined in Part 1. An object of Square class will have both sides equal (i.e. base=height) which are set to zero at the time of the creation of the object. The same functions (area and setValues) of the Rectangle class should be used in Square class too.

  • Write a JAVA source code declaration of the Square class inheriting the Rectangle class to behave according to the specification given above.
  • Write a fragment of client code which creates a Square object, sets its side to 8 and displays its area.

Rationale

This assignment is designed to asses following learning outcomes:

  • be able to design and construct Java Graphical User Interfaces (GUI) that interact with problem domain objects;

Marking criteria

The marking criteria are represented via the following marking guide.

Task1

 

Items

Full Marks

PS

CR (PS+)

DI (CR+)

HD (DI+)

Presentation

10

Very basic presentation (no source code or screen shots were included)

Only report (with screen shots) is present but no source code was submitted

Report, screen shots and source code both are submitted as required

The presentation includes all requirements and is easy to read and understand

Program execution

10

Program is not running but the source code indicates the correctness

Program is running but not working properly

Program is running perfectly but cannot handle unexpected inputs/events

Program is running perfectly and not crashing because of unexpected inputs/events

Loading (POI detail) from file

15

Program is unable to load from the file. Rather user needs to give POIs as inputs.

Loading from file but there are some errors while displaying the POIs

Loading from files without any error

Loading from files without any error and the user can choose a filename to be loaded

Plotting graphically

15

There are several errors in plotting

Only few errors in plotting

No errors in plotting

No errors in plotting and easily understandable by the user

Zooming

10

There are many errors in zooming

Only few errors in zooming

No errors in zooming

No errors in zooming and easy to operate

             

Task 2

Items

Full Marks

PS

CR (PS+)

DI (CR+)

HD (DI+)

Presentation

5

Very basic presentation (no source code or screen shots were included)

Only report (with screen shots) is present but no source code was submitted

Report, screen shots and source code both are submitted as required

The presentation includes all requirements and is easy to read and understand

Program execution

5

Program is not running but the source code indicates the correctness

Program is running but not working properly

Program is running perfectly but cannot handle unexpected inputs/events

Program is running perfectly and not crashing because of unexpected inputs/events

Part 1 (Rectangle)

15

A rectangle class is created but does not meet the asked specifications

Rectangle class is created with all specifications but no instance (object) is created

Instance (object) of the rectangle is created and initialised accordingly

Client code utilises the rectangle object to calculate the area

Part 2 (Square)

15

Simply created the square class that inherits the rectangle class

The square class inherits the rectangle class perfectly and sets its side accordingly

The client code crates the square object and utilises to calculate the area of the square

             

  

WHAT NEED TO SUBMIT:
1. REPORT
 
Quoting from the subject outline, here's the report requirements:
 
"The report (in .doc or .pdf format) should explain how to run your program (1 or 2 page long) and any settings 
needed to run your program. Enough number of screenshots should be shown in the document. In case if the assignment marker fails 
to run your program, because of any inconvenience, these screenshots would show how the program worked on your machine/environment.
"
 
In other word, you must provide clear instructions to me on how to run your programs. Include screenshots
 showing your programs in action, with descriptions with each screenshot. These images will be my fallback in case I am unable to get 
your programs to run on my computer.
 
2. Code Archive
 
You need to submit your code to me in a format that I can use to easily run your programs. 
Since our lab is equiped with NetBeans, we will use this as the minimum standard for code submittion. Please follow these steps:
 
a. Find the folder that contains your assignment 2 Netbeans project. 
b. Compress it using ZIP
c. Rename it to something like this: "111222333-ITC521-Assignment2.zip" (obviously, change 111222333 to 
your actual student ID, and ITC521 to ITC313 if that's your class - Got to say this because I have been blinded in the past).
d. Upload the archive to Interact. Go to ITC521 or ITC313, then Resources --> Assignment project archives --> 
Assignment 2 NETBEANS archives, and upload your ZIP file.

Reference no: EM13847420

Questions Cloud

Direct and clear is highly valued over excessive wordiness : direct and clear is highly valued over excessive wordiness
What is the margin of safety for a profit : Sales volume if in the next period, the company suffered a loss of $30,000. What is the margin of safety for a profit of $90,000?
Calculate amount of bonus and total wages under emersonplan : Standard output in 10 hours is 240 units; actual output in 10 hours is 264 units. Wages rate is $10 per hour. Calculate the amount of bonus and total wages under EmersonPlan.
What are three methods used to control health hazards : What are three methods used to control health hazards in the workplace, and in what order should they be used. What is general ventilation, and what is the major disadvantage of using general ventilation. What is a smoke tube and how is it useful
Plotting some pois on a graph : Several types of point of interests (POI) such as - (1) Petrol station, (2) Taxi Stand, (3) ATM, (4) Hospital and (5) Shopping centre are located in a city. Their locations (longitude and latitude) are provided in a text file (a file will be provided..
What are the main objectives of cost accounting : What are the main objectives of cost accounting? Discuss the treatment of over time premium in cost accounting. Explain controllable and non-controllable cost with examples.
How the equipment will be fully integrated : how the equipment will be fully integrated
Compare the maximum temperature each surface reaches : To compare the maximum temperature each surface reaches for a given input power when in free convection.
What correlation levels between the two assets : a. Suppose we have two assets, A and B. What correlation levels between the two assets will yield diversification benefits in terms of portfolio risk reduction?b. At what correlation level will there be no diversification benefits in terms of portfol..

Reviews

Write a Review

JAVA Programming Questions & Answers

  What are the steps necessary to create a jar file

What are the steps necessary to create a JAR file where the main entry point is identified?

  How to detect the correct ip address and run it locally

When you compile the two modules, with disabling the package statement, it runs on one single machine, that's running the server

  Create system in java using agile approach

You are a software manager in company which designs critical control software for aircraft. Create system in Java using agile approach with a user involved in the development team.

  Program 2 classes one called student one called grades

program 2 classes one called student one called grades functional requirements ask for how many students u need to

  Write a program with an exception handler

Write a program with an exception handler that deals with nonnumeric operands; then write another program without using an exception handler to achieve the same objective.

  One search function

One search function will use a sentinel to mark the end of the array. The other search function will use an array length (maximum legal index into the array) to determine when to exit the search loop. Both functions must return true when the searc..

  Write a java method that repeatedly selects

Write a Java method that repeatedly selects and removes a random entry from an array until the array holds no more entries.

  Compilation and Execution - JAVA problem

Style marks are based on how your submitted code looks. Remember that good code is easily readable (and understandable) by someone who did not write it. For assignments, you should also include your name, student number, what course this is, what ass..

  Possible effect that multithreading could have

Imagine you are a graphic artist working on an animation for a movie. Describe at least one (1) possible effect that multithreading could have on your work process. Support your response with at least (1) example of the effect of multithreading

  Write a program that converts date formats

Write a program that prompts the user to input an integer between 0 and 35. If the number is less than or equal to 9, the program should output the number; otherwise, it should output A for 10, B for 11, C for 12,..., Z for 35. (Hint: use the case..

  Need a console program

Need a console program that repeatedly prompts the user to enter data until they type done (any case, Upper, Lower, or Mixed).

  Write a method called add uneven arrays

Write a method called addUnevenArrays that takes two arrays, a and b, and returns a new array, c, with alength that is the maximum of the lengths of a and b. Each c[i] is the sum of the corresponding elementsof a and b if both elements exist.

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