Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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.

Java, Programming

  • Category:- Java
  • Reference No.:- M91417206
  • Price:- $75

Priced at Now at $75, Verified Solution

Have any Question?


Related Questions in Java

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

In ruby the hash class inherits from enumerable suggesting

In Ruby, the Hash class inherits from Enumerable, suggesting to a programmer that Hashes are collections. In Java, however, the Map classes are not part of the JCF (Java Collections Framework). For each language, provide ...

Operating systems assignment -problem 1 sharing the bridgea

Operating Systems Assignment - Problem 1: Sharing the Bridge A new single lane bridge is constructed to connect the North Island of New Zealand to the South Island of New Zealand. Farmers from each island use the bridge ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Can someone kindly help me to consider whether java

Can someone kindly help me to consider whether Java provides the facility of operator overloading? If it does, may you kindly describe how overloading operators can be accomplished? If not, may you kindly describe why yo ...

Object-oriented software development1 introduction 11

OBJECT-ORIENTED SOFTWARE DEVELOPMENT 1. Introduction 1.1 Assignment Requirement 1.2 Deliverables and Structure (what to submit) 1.3 Software Restrictions 1.4 How to score high... 1.5 Assumptions 2. System Requirements 2. ...

Solving 2nd degree equationsbull write the following java

Solving 2nd degree equations • Write the following Java methods • boolean real-sols(double a, double b, double c): it returns true if the 2nd degree equation ax2 + bx + c has real solutions • double solution1(double a, d ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

Can someone please help me with the following java

can someone please help me with the following java question The input is an N by N matrix of nonnegative integers. Each individual row is a decreasing sequence from left to right. Each individual column is a decreasing s ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As