SENG6110 Object Oriented Programming Assignment

Assignment Help Programming Languages
Reference no: EM133124708

SENG6110 Object Oriented Programming - The University of Newcastle

Introduction
The objective of this assignment is to extend the implementation of Assignment.

Specifications
Create a database which will hold up to 2 region objects. Each region object may have up to 3 dwarf planets in it - see the sample data in the file "input_data.csv". To implement this you should use arrays, one array of up to 2 region objects each with its own array of up to 3 dwarf planets as an attribute.

Question 1. Add a region.
The user will specify a) the region name, b) the width in AU and c) the population of objects with diameters greater than 100km. There should be an error message if the region name already exists in the array, or if there are already 2 region objects in the array.

Question 2. Add a dwarf planet object to one of the region objects.
The user will specify the region name (the object to which this dwarf planet is being added), dwarf planet name, diameter (km), mass (x1021kg) and number of moons. There should be an error message if the dwarf planet already exists, or if the region does not exist, or the region already has 3 dwarf planet objects.

Question 3. Delete a region.
The user will specify the region name. There should be an error message if the region does not exist. This will also cause any dwarf planet objects in that region to be deleted.

Question 4. Delete a dwarf planet.
The user will specify the region and dwarf planet name. There should be an error message if either do not exist. If there exists a region containing that dwarf planet, the region should be updated.

Question 5. List all objects.
The output should list all regions and dwarf planets with all attributes included. If there are no objects, the output should be: "No objects exist". Otherwise, one line should be output for each object with one of these formats:
REGION name width largeObjects
DWARF PLANET regionName dwarfPlanetName diameter mass moons

Question 6. List the dwarf planets that belong in a region.
The user will specify the region name. If the region contains no dwarf planet objects, the output should be: "No dwarf planets contained in this region." Otherwise, one line should be output for each dwarf planet, with this format:
DWARF PLANET regionName dwarfPlanetName diameter mass moons

Question 7. List the dwarf planets with a mass greater than 4 x 1021kg.
The output should be in the format:
DWARF PLANET regionName dwarfPlanetName mass

Question 8. List the dwarf planet with the smallest diameter in each region.
There should be an error message if there are no dwarf planets in the database. The output should be in the format:
DWARF PLANET regionName dwarfPlanetName diameter

Question 9. Import region and dwarf planet information from a file.
The user will specify the name of the file to be read from. The program should expect a file consisting of zero or more lines. Each line should have one of these formats:
REGION name width largeObjects
DWARF PLANET regionName dwarfPlanetName diameter mass moons

The imported data should replace any pre-existing objects. A REGION line in the input file should cause addition of the described region object. Similarly, a DWARF PLANET line should cause addition of the described dwarf planet. An error message should be output if the file is unable to be opened, or if a problem occurred during reading the file. This includes cases such as finding a line with an invalid format and being unable to add a region or dwarf planet due to one of the issues listed under functionalities 1 and 2 (in both cases, the program should continue to process the rest of the file). An example of a file which could be used (after the heading lines are removed) is included as input_data.csv.

Question 10. Write region and dwarf planet information to file.
The user will specify the name of the file to create. The created file should have the same format as that used for importing. An error message should be output if the file is unable to be created, or if a problem occurred during writing.

Program Requirements

In this assignment you should use arrays to store the region and dwarf planet objects. Use two constants specifying array sizes.

The program should consist of three classes (and ONLY three classes). Use the supplied "files to start with", do not change their names or add any additional files.

All instance variables of your classes should be private (this is imposed so that you apply the principles of encapsulation).

Your classes will need methods to provide the required functionalities. The only class which should have a main() method is Interface.java.

Attachment:- Programming Assignment.rar

Reference no: EM133124708

Questions Cloud

How many copies of the software should i attempt to sell : Shaughnessy Consulting, LLC currently enjoys a patent on software that estimates economic damages for clients involved in personal injury lawsuits. Demand for m
Which firm should Andy purchase : The MD&A shows positive news for Wilson and negative news for Zytec. Which firm should Andy purchase? Show calculations
Process of turning sugar into candy canes : For a company that produces candy canes, sugar is 70 percent of its ingredient costs. The United States limits the imports of sugar to protect cane farmers, whi
Calculate the total effect on welfare of a tariff : A small country can import a good at a world price of 5 per unit. The domestic supply curve of the good is S = 10 + 10P. The demand curve is D = 600 - 5P. In ad
SENG6110 Object Oriented Programming Assignment : SENG6110 Object Oriented Programming Assignment Help and Solution, The University of Newcastle - Assessment Writing Service
Find the optimum replacement interval for equipment : A tractor can be purchased for $45,000. Annual O&M costs are expected to increase $1,500 every year, with a 1st year O&M cost of $3,000.
Determine amount of overhead assigned to each product line : Determine the amount of overhead assigned to each product line if Product A requires 70% of the labor hours and Product B requires 30%
Pw analysis and cash flow approach : A regional architecture/contractor firm, purchased an HVAC unit for $25,000 that was expected to last 15 years. It has a salvage value of $0 in 10 more years.
Explain moral hazard in credit markets : Explain how moral hazard in credit markets lead to credit rationing.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write program which prompts for boiling point of substance

Write program which prompts user for observed boiling point of substance in Centigrade and identifies substance if observed boiling point is within 5% of the expected boiling point.

  Difference between the 2 graphics

It is the business that has the knowledge about their entities (things of importance) and what kind of unique information that separate them (invoice numbers, customer IDs, and so on).

  You will have to override some of the step-by-step procedure

Actually the author has not asked you to develop any new page here except that you will need to apply your external style sheet in your Index and Yurts pages done in Assignment 1A.

  Write a prolog program to solve the water jugs problem

Write a Prolog program to solve the water jugs problem: There are two jugs, one holding 3 and the other 5 litres of water. A number of things can be done with the jugs: they can be filled, emptied, and dumped one into the other either until the pou..

  Compare use of r vs python and define pros and cons of each

Several Big Data Visualization tools have been evaluated in this weeks paper. While the focus was primarily on R and Python with GUI tools, new tools are being.

  Writing application to accept loan amount-interest rate

Write down the application to accept a loan amount, annual interest rate, and loan period (in number of years) and displays a table with five columns.

  Implement at least two locked doors to your game

Describe your game, including the back story and the setting of the game - Implement at least two locked doors to your game.

  Generate three address code

For each of the given C assignment statements.- Generate three-address code, assuming that all array elements are integers taking four bytes each.

  Write a progra whether a number is prime

Write a progra whether a number isPrime(int number) method for testing whether a number is prime. Use this method to find the number of prime numbers less than 10000.

  Unit 01 Programming Assignment

Unit 01 Programming Assignment Help and Solution, Higher National Diploma in Computing - Assessment Writing Service - Define basic algorithms to carry out

  Write a program which asks the user to enter a letter grade

Write a program which Asks the user to enter a letter grade (A, B, C, D, F) or (a, b, c, d, f) and Validates that the entry is a letter grade (A, B, C, D, F) or (a, b, c, d, f).

  Explain how you can draw the application development

Explain how you can draw the application development group's attention into the skill of threat modelling - Identify the vulnerability and remediate

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