CSC72003: New BlueJ Project - Computer Science Assignment Help

Download Solution Order New Solution
Assignment Task:

Assignment Q1

  • Create a word document and call your document username-A1Q1.docx. For example, mine would be nfrancis10-A1Q1.docx
  • Open the house project from chapter 1 of the book projects.
  • Open the terminal window and tick the record method calls.
  • Create a picture with at least two (2) objects of circle, two (2) objects of square, two (2) objects of triangle, and two (2) objects of person, recording all method calls.
  • Use the methods provided to divide the objects into two groups, each group must only have one type of object. For example, a group must have a circle, a square, a triangle and a person. Take a screenshot of your picture and add it to the word document you created earlier.
  • Now copy the list of method calls needed to create the picture to the word document after the screenshot.
  • Add your name and student ID in the footer of the word document, as well as "CSC72003 Assignment 1 Q1".

Assignment Q2 (CSC72003)

  • Create a new BlueJ project called username-A1Q2. For example, mine would be nfrancis10-A1Q2.
  • Click on New Class and give the class a name of Book. Make sure "Java" and "class" are selected.
  • Write a description of your new Class in the top comments. Make sure you put in your name as the author and the date as the version you last worked on this exercise.
  • Add 2 fields that are suitable for a book. One field should have a type of int, the other should have a type of String.
  • Add a third double field called rating. A rating has a range between 0.0 to 5.0. Bigger than 4.0 is a top seller. 
  • Write a constructor for your Book class that takes two (2) parameters - the first of type int, the second of type String. Set the initial values of the first 2 fields that you created using the parameters.
  • Write accessor methods for all 3 of your fields.
  • Write mutator methods for all 3 of your fields.
  • Write a method called printDetails, which prints out all the details of a Book object. Please have a look at the ‘Printing’ section in the Topic 2 study guide to see how to do this.
  • Take into account the rating status. The printDetails method should have an if-else statement that prints a line saying that the Book is a top seller or not.

Assignment Q3 (CSC72003)

  • Create a new BlueJ project called username-A1Q3. For example, mine would be nfrancis10-A1Q3.
  • Create a class called Vehicle, that contains five fields, current speed, power, accelerate, decelerate and top speed, all of which type is int.
  • Make sure you write a description of your new Class in the comments, with your name as author and date as the last date you worked on this exercise.
  • Define a constructor that takes and sets the accelerate, decelerate; sets the power to 20, and top speed to 120. Leave the current speed as 0.
  • Also define a constructor that takes no parameters. The power field should be set to the value of 30 in this constructor, top speed to 160, and accelerate and decelerate to reasonable amounts. Leave the current speed as 0.
  • Define the mutators speed up and brake, whose effect is to increase or decrease the value of current speed by the (power + accelerate) and (power – decelerate) respectively. The mutator methods should not let the current speed to be set to a value higher than the top speed, or lower than zero.
  • Add a mutator method that sets the value of the power. Add a check to make sure that the new power value is not set higher than 50 or lower than 10.
  • Define an accessor method to return the value of current speed.
  • Test your work. Zip the project and include in your assessment files.

Assignment Q4 (CSC72003)

  • Create a new BlueJ project called your username-A1Q4. For example, mine would be nfrancis10-A1Q4.
  • Before you start to code, make sure to enable the “record method calls” in the BlueJ terminal.
  • Create a class called VeggieBasket, that has one ArrayList field called vegetables, which holds a collection of Strings.
  • Make sure you write a description of your new Class in the comments, with your name as author and give the version as the date you last worked on this exercise.
  • Define a constructor that initialises the ArrayList. Note that you can add any other initialisations that you feel are relevant.
  • Create methods to add elements, remove elements and get the number of elements in the collection. Make sure you add tests for errors and sensible error messages.
  • Create a method called printVeggies. This method should loop through the collection and print out the elements (each Integer on one line) as determined by the following rules;

• If the vegetables has a total letter less than 6, instead of printing the vegetable name, it should print “Gollum”.
• If the vegetable starting letter begin with a vowel, instead of printing the vegetable name, it should print “Frodo”.
• If both conditions above are satisfied, it should print “Legolas”.
• If none of the prior criteria are met, then the method should print “Gandalf”.
Write a method countNames that prints the most name that appeared with its total counts.
Once you have finished your project, clear the terminal window in BlueJ and record the following. Add at least eleven (10) Vegetables inside the ArrayList using the add method you wrote. You must have vegetables that satisfy all of the printVeggies conditions.
Demonstrate removing an element using the remove method you wrote, and then find the number of elements using your method. Finally, run your printVeggies method.
Copy all your calls into a text file (.txt) and save it in your BlueJ project folder.

This CSC72003: Computer Science Assignment has been solved by our Computer Science Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.