Get 30% Off + $20 Signup Bonus ! Limited Time, Hurry !
Securing Higher Grades Costing Your Pocket?
Book Your Assignment at The Lowest Price
Now!
Students Who Viewed This Also Studied
SENG6110 Programming
Task
Dwarf Planets Database – Help with starting your assignment
This document aims to provide some advice to help you start assignment 1. Note that you do not have to follow these steps exactly, there are many other ways to complete the assignment.
Two general comments first
1. Compiling your code
1. The first advice is to compile your code very often, even after every small change. If you spend 10 minutes writing code before trying to compile – and the compiler gives you one or more errors – it is more difficult to find the error. I always compile every time I stop typing, which could be more than once per minute. Then if I have an error, I know what part of the code caused it.
2. When you have an error the Java compiler gives you a line number on which it has found the error. This line number is actually the place in the code where the compiler became aware of the error. It is often the line where the error is, but sometimes the error is on a previous line. A common example is an incorrect number of closing parentheses ) or brackets } , Java often becomes aware ofsuch an error many lines after where the closing bracket should have been in your code.
3. Sometimes the compiler will give you a lot of errors. Don’t be too concerned, the first error may be causing many of the other errors if not all of them. Fix the first error in the list only, then recompile. Often some or all of the other errors will also disappear.
Writing your program for this assignment
Step 1
– Work on an initial version of DwarfPlanet.java. There is a template available on Canvas that may help.
– Declare instance variables using the assignment specification. Compile and fix any errors.
– Implement some get and set methods. Again, compile, and fix any errors.
Step 2
Write an initial version of Interface.java. There is a template available on Blackboard that may help. Test your DwarfPlanet class using Interface. Here is some example code:
Scanner console = new Scanner(System.in)
System.out.println(“Enter name: “);
String name = console.nextLine();
DwarfPlanet ceres = new DwarfPlanet;
ceres.setName(name);
System.out.println(“Name: ” + ceres.getName());
Compile and run. Implement more methods of DwarfPlanet, then test them.
After testing, remember to comment out any of the above lines used only for testing.
Step 3
Write an initial version of Region.java. There is a template available on Canvas that may help. Test your DwarfPlanet class using Interface.java. Here is some example code.
// create a Region object
Region kuiper = new Region;
// add a DwarfPlanet attribute of the Region class
kuiper.addDwarfPlanet();
Compile and run.
Step 4
Use the code in Interface.java to modify the menu of options for your assignment. Just use placeholder methods as I have done to cover all the options in the menu (so that you can test the menu). You can add the relevant code later. Compile and test before proceeding.
Add code to your program, implementing each function in the assignment specification. Compile, run, and test your program as you go. As stated above, these steps just provide a starting point. Depending on what questions are received from students, I will add information to Canvas and send an email to let you all know
Dwarf Planets Database
The objective of this assignment is to implement an object-oriented program (using Java) to manage a database of objects containing information about dwarf planets in our solar system.
This assignment must be completed individually.
What are “dwarf planets”?
A dwarf planet is a small planetary-size object that orbits the Sun. When Pluto was discovered in 1930 it was declared to be the ninth planet in our solar system and millions of school children learned the names of the nine planets. By the 1990s, however, several other objects similar in size to Pluto had been discovered in the Kuiper belt (in the region beyond Pluto) including the dwarf planet Eris. The unknown number of these objects and other reasons led the International Astronomical Union (IAU) in 2006 to formally redefine the term planet so that Pluto was no longer included, instead Pluto joined the growing number of dwarf planets. There are five officially recognised dwarf planets as of the time of writing but up to 120 other potential dwarf planets. The five are Ceres, Pluto, Eris, Haumea and Makemake, potential inclusions include Quaoar, Sedna, Orcus and Gonggong.
Before you start
Carefully read the specification below. Make sure you have all the information necessary to start writing the program. If you are uncertain of something, do not make assumptions. Post your questions to the discussion board forum named “Assignment 1” and check it regularly.
Try to start the assignment as soon as possible. There are additional resources on Canvas which you can use as a starting point.
There are three Java files on Canvas which you should use as a template – that is, start with these files and add your own code to them. You do not need to re-write the code found in these files, it is a starting point for you. Do not add any additional classes or files to your answer and do not change the names of these classes or files.
Specification
Your database will hold nine dwarf planets with the attributes listed below. See the file “dwarf_planet_data.csv” for the complete data.
When run, the program will display a menu of actions to the user, including one that exits the program. Until the user chooses to exit, the menu is displayed again after each action is completed. A working menu is supplied in the file Interface.java – you should modify this code for your own answer. Do not completely re-write it, but add to it where necessary.
Write code to do the following. Most of this code will be added to the file Interface.java – add code to the other two classes when appropriate.
Menu option 1. Create the nine dwarf planet objects.
This involves
a. Completing the DwarfPlanet.java class with the attributes listed below. You should write getter (accessor) and setter (mutator) methods for all attributes.
b. The DwarfPlanet class should have two constructor methods, one which will set the values of all attributes from parameters in its call, the other which expects no parameters.
c. Write code to create the objects by using the first constructor. Hard-code the data into your program – use the data from the dwarf_planet_data.csv file.
Menu option 2. List all the data you have entered into the database.
That is, all attributes for all objects.
Menu option 3. Delete the dwarf planet Eris from the database.
Menu option 4. Manually add the dwarf planet Eris back again.
This means reading all the attribute values from the keyboard. When the user has finished, the program should display the values added.
Menu option 5. Change the number of moons of Sedna to 1.
Do this by
a. Reading the new value from the keyboard
b. Changing the value in the database
c. Displaying the values of all attributes for this dwarf planet.
Menu option 6. Calculate the average (mean) diameter for the Kuiper belt dwarf planets.
Menu option 7. List the orbital radius and orbital period for a given non-Kuiper belt dwarf planet.
The dwarf planet to be used should be read from the keyboard.
Menu option 8. List names of all dwarf planets with a radius greater than a value read from the keyboard.
Menu option 9. (Challenge)
Write a Region class and instantiate an object called Kuiper. Add the three dwarf planets to it as attributes of type DwarfPlanet. When all three are added, display the values of the attributes for all three by calling a method in the Region class.
Menu option 10. (Challenge)
Implement part of the interface using GUI components.
Task 11. Provide a UML class diagram of your program.
Additional program requirements
The program should consist of three classes with the following names and instance variables (attributes). You may need other variables in these classes.
Class name: DwarfPlanet
name – the name of the dwarf planet
region – the region of the solar system, here we use “Kuiper belt” or “Other” only.
orbitalRadius – the radius of the orbit, units Astronomical Units (AU). One AU is the
distance of the Earth from the Sun.
orbitalPeriod – the time taken to complete one orbit of the Sun, units years.
diameter – the diameter of the object, units km.
mass – the mass of the object, units 1021kg
moons – the number of objects orbiting the dwarf planet.
Class name: Region
Attributes of type DwarfPlanet.
Class name: Interface
The class with the main() method.
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, which should create an instance of the class Interface, and call a method run(), which will display the menu to the user (this is provided for you in the files you should start with). This class will be the only one that takes input from and sends output to the user. It may do so using either TIO or GUI methods (your choice). A template is shown below and the file Interface.java is available for you to use.
public class Interface {
private void run(){
// All your code here …
}
// Create an instance of this class and run the code above
public static void main(String[] args){
Interface infFace = new Interface();
intFace.run();
}
}
SENG6110 Programming
Answer in Detail
Solved by qualified expert
Get Access to This Answer
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.
Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.
Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.
Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.
62 More Pages to Come in This Document. Get access to the complete answer.
More SENG6110 SENG6110 Programming: Questions & Answers
CIS 480 Introduction To Computer Architecture
Question:
Objectives
This project is designed to help students to understand the pipelining on a RISC architecture (MIPS), pipeline hazards, and hazards mitigation techniques including forwarding and stalling. Students will gain programming experience in C.
Goals
Your team of 2 students wi …
View Answer
Management
1. a) Calculate and display the first 10 numbers divisible by 2, 3 AND 5b) Allow the user to state the number of values to display (hint: first consider how you would check the validity of a number)2. Allow the user to enter 3 integers in the ran …
View Answer
Business Algorithm Development
LO 1. be able to explain the steps involved in a disciplined approach to problem-solving, algorithm development and coding LO 2. be able to demonstrate and explain elements of good programming style LO 3. be able to identify, isolate and correct errors in all phases of the programming process …
View Answer
SOFE4630U Cloud Computing
Questions:
ObjectiveThe objective of this individual programming assignment is to get a flavour of the effort involved in designing and developing fully functional browser-based application hosted in the cloud. You will practice designing and developing a novel cloud-based application of your cho …
View Answer
Content Removal Request
If you are the original writer of this content and no longer wish to have your work published on Myassignmenthelp.com then please raise the
content removal request.
Choose Our Best Expert to Help You
Liam Horan
Pursuing PhD in Mathematics with specialization in Probability and Statistics
470 – Completed Orders
Hire Me
Isabelle Underwood
post graduation degree from Massachusetts Institute of Technology in Agricultural Engineering.
900 – Completed Orders
Hire Me
Still in Two Minds? The Proof is in Numbers!
38983 Genuine Reviews With a Rating of 4.9/5.
Project Management
Thesis: 20 Pages, Deadline:
7 days
It was a pretty good assignment I hope that and the others will be like this one
User ID: 6***39 Greece
Management
Assignment: 10 Pages, Deadline:
5 days
i always go back for the assignment !! they are the best amazing work so fast and on time !!
User ID: 7***36 Riyadh, Saudi Arabia
HRM
Essay: 1 Page, Deadline:
2 days
well-written discussion and completed before deadline. Excellent service by customer care team.
User ID: 7***17 Riyadh, Australia
Marketing
Assignment: 10 Pages, Deadline:
4 days
Thank you for this excellent and valuable fileI thank the expert for his professional efforts in preparing the fileI would also like to thank the team …
User ID: 9***3 Riyadh, Kuwait
Management
Programming: 8 Pages, Deadline:
16 days
Hi thank you once again excellent service and timely, thank you for the hard work please thank the writer much appreate the effort involved
User ID: 7***88 Melbourne, Australia
It Write Up
Assignment: 5 Pages, Deadline:
5 days
The assignment was done on time and received good feedback from the teacher. Thank you team for helping out
User ID: 3***28 Melbourne, United States
Programing
Programming: 3 Pages, Deadline:
3 days
Excellent work for this particular assignment, and it is extremely helpful thanks!
User ID: 8***44 Melbourne, United States
Management
Programming: 6 Pages, Deadline:
14 days
I was impressed with the work done,especially with explaining to the detail and maintaining the word limit and giving good references.happy to receive …
User ID: 8***74 Launceston, India
Assignment
Essay: 6 Pages, Deadline:
4 days
it was a good essay but it didn’t give me a very good mark in all , I was able to get a pass for the unit.
User ID: 3***08 Launceston, Australia
Project Management
Assignment: 6 Pages, Deadline:
9 hours
I received an A; great job; A LOT of APA formatting errors, but the data on the homework itself, GREAT!!
User ID: 8***71 Thornton Heath, United States
Management
Essay: 0.8 Pages, Deadline:
1 day
great work …i can always trust this site for doing my work that too within my budget.
User ID: 6***66 Brampton, Canada
Management
Assignment: 16 Pages, Deadline:
7 days
the work was fine. i had no problem in the plagiarism thing. although it was a bit late but u guys still managed to do and were cooperative with it
User ID: 8***64 United Kingdom, Great Britain
English
Essay: 2 Pages, Deadline:
6 days
The Paper was great had a few errors but did an outstanding job. I will recommend a friend
User ID: 8***01 Beaufort, United States
Operations
Essay: 40 Pages, Deadline:
3 days
Very good and hard work I’m so happy and glad to hear about this company Anyone can order from this company I’m sure you will be so happy for this …
User ID: 3***20 United Kingdom, Great Britain
Healthcare
Programming: 12 Pages, Deadline:
7 days
good work done by expert. satisfied with grade. Looking forward to get help with all my assignments. Than k you
User ID: 7***17 United Kingdom, Australia
Audit
Programming: 6 Pages, Deadline:
3 days
Thank you again for great work. The expert was perfect for this assignment. I highly recommend my assignment help.
User ID: 8***29 United Kingdom, Canada
Healthcare
Essay: 8 Pages, Deadline:
9 days
headacefree pass good job i recommande to trust my assignment help group…………………
User ID: 3***24 United Kingdom, Australia
Operations
Course Work: 9.6 Pages, Deadline:
22 days
Thank you, good job, my rating is 4.5good report covered all the assignment requirements well done !
User ID: 8***10 United Kingdom, Egypt
Biology
Assignment: 0 Pages, Deadline:
3 days
Glad with the work and recommend it’s usage by students who need help. I was content with the presentation of the work, I just did some few changes …
User ID: 5***86 Gaborone, United States
Programing
Programming: 1 Page, Deadline:
14 hours
It would be better if the experts could read the documentation requirements carefully
User ID: 7***76 Gaborone, Canada
Project Management
Thesis: 20 Pages, Deadline:
7 days
It was a pretty good assignment I hope that and the others will be like this one
User ID: 6***39 Greece
Management
Assignment: 10 Pages, Deadline:
5 days
i always go back for the assignment !! they are the best amazing work so fast and on time !!
User ID: 7***36 Riyadh, Saudi Arabia
HRM
Essay: 1 Page, Deadline:
2 days
well-written discussion and completed before deadline. Excellent service by customer care team.
User ID: 7***17 Riyadh, Australia
Marketing
Assignment: 10 Pages, Deadline:
4 days
Thank you for this excellent and valuable fileI thank the expert for his professional efforts in preparing the fileI would also like to thank the team …
User ID: 9***3 Riyadh, Kuwait
Management
Programming: 8 Pages, Deadline:
16 days
Hi thank you once again excellent service and timely, thank you for the hard work please thank the writer much appreate the effort involved
User ID: 7***88 Melbourne, Australia
It Write Up
Assignment: 5 Pages, Deadline:
5 days
The assignment was done on time and received good feedback from the teacher. Thank you team for helping out
User ID: 3***28 Melbourne, United States
Programing
Programming: 3 Pages, Deadline:
3 days
Excellent work for this particular assignment, and it is extremely helpful thanks!
User ID: 8***44 Melbourne, United States
Management
Programming: 6 Pages, Deadline:
14 days
I was impressed with the work done,especially with explaining to the detail and maintaining the word limit and giving good references.happy to receive …
User ID: 8***74 Launceston, India
Assignment
Essay: 6 Pages, Deadline:
4 days
it was a good essay but it didn’t give me a very good mark in all , I was able to get a pass for the unit.
User ID: 3***08 Launceston, Australia
Project Management
Assignment: 6 Pages, Deadline:
9 hours
I received an A; great job; A LOT of APA formatting errors, but the data on the homework itself, GREAT!!
User ID: 8***71 Thornton Heath, United States
Management
Essay: 0.8 Pages, Deadline:
1 day
great work …i can always trust this site for doing my work that too within my budget.
User ID: 6***66 Brampton, Canada
Management
Assignment: 16 Pages, Deadline:
7 days
the work was fine. i had no problem in the plagiarism thing. although it was a bit late but u guys still managed to do and were cooperative with it
User ID: 8***64 United Kingdom, Great Britain
English
Essay: 2 Pages, Deadline:
6 days
The Paper was great had a few errors but did an outstanding job. I will recommend a friend
User ID: 8***01 Beaufort, United States
Operations
Essay: 40 Pages, Deadline:
3 days
Very good and hard work I’m so happy and glad to hear about this company Anyone can order from this company I’m sure you will be so happy for this …
User ID: 3***20 United Kingdom, Great Britain
Healthcare
Programming: 12 Pages, Deadline:
7 days
good work done by expert. satisfied with grade. Looking forward to get help with all my assignments. Than k you
User ID: 7***17 United Kingdom, Australia
Audit
Programming: 6 Pages, Deadline:
3 days
Thank you again for great work. The expert was perfect for this assignment. I highly recommend my assignment help.
User ID: 8***29 United Kingdom, Canada
Healthcare
Essay: 8 Pages, Deadline:
9 days
headacefree pass good job i recommande to trust my assignment help group…………………
User ID: 3***24 United Kingdom, Australia
Operations
Course Work: 9.6 Pages, Deadline:
22 days
Thank you, good job, my rating is 4.5good report covered all the assignment requirements well done !
User ID: 8***10 United Kingdom, Egypt
Biology
Assignment: 0 Pages, Deadline:
3 days
Glad with the work and recommend it’s usage by students who need help. I was content with the presentation of the work, I just did some few changes …
User ID: 5***86 Gaborone, United States
Programing
Programming: 1 Page, Deadline:
14 hours
It would be better if the experts could read the documentation requirements carefully
User ID: 7***76 Gaborone, Canada
Have any Query?
The post SENG6110 Programming- Implement an Object Oriented Program appeared first on My Blog.