CSC72003 Programming Assignment Problem

Assignment Help Programming Languages
Reference no: EM132408708

CSC72003 - Programming - Southern Cross University

Specifications

Your task is to complete various exercises in BlueJ, using the Java language, and to submit these via the MySCU link created for this purpose.

Marking criteria includes:

• Use of correct coding style, including the use of comments;
• Accuracy of coding;
• Use of suitable coding structures;
• Correct submission and naming conventions of assessment items as required.

Assignment Q1

To be completed in week 1

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 record method calls.
Create a picture with at least six (6) objects (circle, square, triangle, and person), recording all method calls.
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

To be completed in week 2

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 Computer. 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 computer. One field should have a type of int, the other should have a type of String.
Add a third boolean field called isNew.

Write a constructor for your Computer 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 Computer 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 isNew status. The printDetails method should have an if-else statement that prints a line saying that the computer is new, or the computer is not new.

Assignment Q3

To be completed in week 3

Create a new BlueJ project called username-A1Q3. For example, mine would be nfrancis10- A1Q3.
Create a class called Heater, that contains four fields, temperature, increment, max and
min, all of whose type is double.

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 min, max and sets the temperature to 20.0, and increment to 1.0.
Also define a constructor that takes no parameters. The temperature field should be set to the value of 20.0 in this constructor, increment to 1.0, and maximum and minimum to reasonable amounts.
Define the mutators warmer and cooler, whose effect is to increase or decrease the value of temperature by the increment respectively. The mutator methods should not let the temperature be set to a value higher than max, or lower than min.

Add a mutator method that sets the value of the increment. Add a check to make sure that the increment is not set higher than 3 or lower than 0.

Define an accessor method to return the value of temperature. Test your work.
Zip the project and include in your assessment files.

Assignment Q4

To be completed in week 4

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 LotsOfFruits, that has one ArrayList field called fruits, 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 printFruits. 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 fruit has a total letter less than 6, instead of printing the fruit name, it should print "ABRA".
• If the fruit starting letter begin with a vowel, instead of printing the fruit name, it should print "cadabra".
• If both conditions above are satisfied, it should print "Abracadabra".
• If none of the prior criteria are met, then the method should print the fruit name.
For example, if the collection contained the Strings "akee", "pear", "strawberry", then the printout would look like:
Abracadabra ABRA
strawberry

Once you have finished your project, clear the terminal window in BlueJ and record the following. Add at least eleven (10) Fruits inside the ArrayList using the add method you wrote. You must have fruits that satisfy all of the printFruits conditions.

Demonstrate removing an element using the remove method you wrote, and then find the number of elements using your method. Finally, run your printFruits method.
Copy all your calls into a text file (.txt) and save it in your BlueJ project folder.

Assignment Q5

To be completed in week 5

Create a new BlueJ project called your username-A1Q5. For example, mine would be nfrancis10-A1Q5.
Inside the project you will need to create two classes, which is PartA and PartB.

Part A:

Imagine you need to open a standard combination dial lock but don't know the combination. Write a Java program in BlueJ with a method that prints all of the possible combinations, so you can print them on a piece of paper and check off each one as you try it. Assume the numbers on each dial range from zero to nine and three numbers in sequence are needed to open the lock. For example, the output would look like:
0-0-0

0-0-1

0-0-2

// lots more combinations 9-9-8
9-9-9

Part B:

Suppose the lock isn't a very good one and any number that's no more than one away from the correct number in each digit will also work.
Write another method that takes 3 parameters of type int that are the combination of the lock. The method will print out a minimal list of combinations you would need to try to guarantee opening the lock.

For example, if the combination is 7-6-3 then 7-5-4, 6-6-2, 8-5-3 and other combinations will also open the lock. The first combination printed would be 6-5-2 and the last would be 8-7-

4. You will also need to make sure that no number in the combinations that are printed is less that zero and greater than nine as the numbers on each dial range from zero to nine.

Attachment:- Programming - Assignment.rar

Reference no: EM132408708

Questions Cloud

Major differences between the various generations : What are the major differences between the various generations (Baby Boomers, Gen X, Millennials, etc): their issues on and views of retirement?
Calculate the weight of debt in the capital structure : Calculate the weight of debt in the capital structure. (Enter percentages as decimals and round to 4 decimals)
Discuss about the breast cancer screening outreach programs : Find information about two evidence-based practice (EBP) breast cancer screening outreach programs aimed at younger Latina women.
Calculate big door wacc : The risk-free interest rate is 2.9%, and the market risk premium is 6.8%. The company has a 35% tax rate. (Do not round intermediate calculations.)
CSC72003 Programming Assignment Problem : CSC72003 Programming Assignment Help and Solution, Southern Cross University - Assessment Writing Service - Write a description of your new Class in top comment
How many shares will green repurchase : Green Manufacturing is an all equity firm with a current market value of $20,000,000 and 500,000 shares outstanding.
Homeland security and emergency management : Which to write that deals with aspect or issue involving homeland security and emergency management and email your instructor for approval by end of Module
Expected return on an effective annualized basis : You do not expect there to be any regulatory hurdles to this transaction, which will allow the transaction to close in six months' time.
Conduct descriptive analysis - appropriate statistical test : Conduct the appropriate statistical test at a= .05 using SPSS. Please conduct descriptive analysis and appropriate statistical test statistics analysis.

Reviews

len2408708

11/27/2019 10:29:37 PM

Programming assignment - 1 the assignment is almost similar to my last session assignment. only changed a few small questions here and there. I herewith attached all published assignment details documents according to my blackboard unit assignment folder. /also attached the last session assignment file you have done. (please note this is the difference from this current assignment) please let me know your reasonable charge for this assignment. this is almost similar and just needs to change/answer only a few questions. (mostly in question 3,4,5) If you need any information or questions regarding this assignment, please let me know before you start.

Write a Review

Programming Languages Questions & Answers

  Dishtinguish antigone and what you know of theban saga

How would you dishtinguish Antigone, and what you know of Theban saga, to Oresteia, and what you know of story of Mycenaean saga?

  Javascript for metric conversions

Write a javascript that will assist the user with metric conversions. Your program should allow the user to specify the names of the units as strings.

  Program to add function for long integer

The help required is to provide a working add function in c. Hopefully after that I will be be able to write similar functions to subtract multiply and divide.

  Write a function to calculate your wages for a part-time job

Explain how an animation uses still images and loops to create the illusion of motion. Write a function to calculate your wages for a part-time job. (Don't worry about calculating overtime.)

  Draw a plot showing sustained oscillations

Use the Ziegler-Nichols (Z-N) method to find Ku and Tu. Draw a plot showing sustained oscillations and period of the oscillations. An example plot is shown in figure 3.5. Provide the values of Ku and Tu.

  Write program that acts like a simple calculator for binary

You will write a program that acts like a simple calculator for binary numbers. You should read in a string of input that has the format: number operator number.

  Create program-ask user to enter amount of purchase

Create a program which will ask the user to enter the amount of a purchase. The program must then compute the state and county sales tax.

  Write program to find smallest-largest value from n numbers

Write down program which will determine the smallest, largest and average values in collection of N numbers. Get value of N before scanning each value in collection of N numbers.

  Describe how to prepare users for sales organization unit

Describe how you would prepare the users for sales organization unit and how you can set up user groups in particular conditions (global, universal, domain local).

  Write a recursive method nmbdigits

Design and implement meanIter, the iterative version of the method - Write a recursive method nmbDigits which takes an integer value as parameter and returns the number of digits of the parameter value

  Design an application

The entries cannot be less than 0 or above 100.

  Explain what n represents in your program

Provide an example of a program that contains an algorithm whose Big-T is exponential. Clearly explain what n represents in your program.

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