COSC2531 Programming Fundamentals Assignment

Assignment Help JAVA Programming
Reference no: EM132471650

COSC2531 - Programming Fundamentals - RMIT University

Overview

The objective of this assignment is to develop your programming and problem solving skills in a step- by-step manner. The different stages of this assignment are designed to gradually introduce different concepts, such as loops, arrays, and methods. Students may be awarded partial marks for explaining a valid strategy, even if the program is not working.

Develop this assignment in an iterative fashion (as opposed to completing it in one sitting). You can and should get started now as there are concepts from the week 1 lessons that you can incorporate from now itself.

Assessment Criteria

This assessment will determine your ability to:
1. Follow coding, convention and behavioral requirements provided in this document and in the lessons.
2. Independently solve a problem by using programming concepts taught over the first several weeks of the course.
3. Write and debug Java code independently.
4. Document code.
5. Ability to provide references where due.
6. Meeting deadlines.
7. Seeking clarification from your "supervisor" (instructor) when needed via discussion forums.
8. Create a program by recalling concepts taught in class, understanding and applying concepts relevant to solution, analysing components of the problem, evaluating different approaches.

Learning Outcomes

LO 1. Demonstrate knowledge of basic concepts, syntax and control structures in programming
LO 2. Devise solutions to simple computing problems under specific requirements
LO 3. Encode the devised solutions into computer programs and test the programs on a computer
LO 4. Demonstrate understanding of standard coding conventions and ethical considerations in programming.

Assessment details

MyBlock is a simple tool which can help one design a block of land. Your task is to write a Java program that implements the design functionality, checks if all the rules are followed, displays the block. The basic structure of the code is provided in the Canvas shell. You need to complete the following tasks. Please use the skeleton code provided to complete your code.

Your program should consist of a MyBlock class. The class has a two dimensional array of integers called block. The class also has a Boolean variable vacant that stores the information of whether the block of land is vacant or not. The methods of this class are: displayBlock(), addHouse(), and clearBlock().

Assessment Task A

The constructor of the MyBlock class takes 2 parameters: the number of rows of the block, the number of columns of the block. In the constructor of this class, write code to initialize the block with the size of row and column. Initialize each value of the array block with the value 0, which means that block is unused. Initialize the value of vacant to true.

Assessment Task B

Write a method of the MyBlock class called displayBlock() that prints the block as a two dimensional array. Give a space between each element during printing, and use a line for each row. An example of the output of displayBlock() is shown below, for a vacant block of 4 x 3.

0 0 0 0
0 0 0 0
0 0 0 0

Assessment Task C
Write a method of the MyBlock class called clearBlock()that sets the value of each element of the array ‘block' to zero (0). Set the value of vacant to true.

Assessment Task D

From the main method, the user can enter the row and column of the block. The number of rows and the number of columns should be an integer greater than 2 and less than or equal to 10. If any input is incorrect, show an error message and ask for that input again. If all inputs are correct, create an object of MyBlock class from main method. The row and column values are passed as the parameter of its constructor.

Assessment Task E

From the main method, show a menu to the user with the following options. If the input is neither 1,2,3,4, show an error message and ask the user for input again.

1. Add a house
2. Display the block
3. Clear the block
4. Quit

Assessment Task F
Implements the addHouse() method that takes four input parameters: the row position, the column position, the number of rows, and the number of columns of the house. Parameters row position and column position are the house's top left corner position. For example (2, 1) means the house starts from 2 rows down from the top and 1 column from the left edge of the block.

Attachment:- Programming Fundamentals.rar

Reference no: EM132471650

Questions Cloud

What implications would this have for the economy : Suppose the Central bank were required to conduct monetary policy so as to hold the unemployment rate below 4%.
How accounts should be reviewed by the auditors to gain : How accounts should be reviewed by the auditors to gain reasonable assurance that additions to property, plant, and equipment are not understated?
What are the major factors causing a shift in aggregate : What are the major factors causing a shift in aggregate demand (inward or outward)? What are the major factors that will affect short-run aggregate supply?
How the audit procedure of confirmation is least appropriate : How The audit procedure of confirmation is least appropriate with respect to The trustee of an issue of bonds payable. Holders of common stock.
COSC2531 Programming Fundamentals Assignment : COSC2531 Programming Fundamentals Assignment Help and Solution, RMIT University - Assessment Writing Service - develop your programming and problem solving
Write down the budget constraints of the consumer : (a) Write down the budget constraints of the consumer and the government for each alternative tax instrument.
What is greta marginal rate of substitution : What is Greta's Marginal Rate of Substitution? what kinds of goods Greta considers these to be?
Determine the valuation of year-end accounts payable : Determine the valuation of year-end accounts payable is most likely addressed by Examination of cash disbursements immediately prior to year-end.
Why countries engage in international trade : Why countries engage in international trade and how that country aligns with the PPF concept.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Draw a picture with an appearance

You must use the given Rectangle and Oval classes to draw a picture with an appearance as close as possible.

  Write a program to simulate the behavior of the philosophers

Write a program to simulate the behavior of the philosophers, where each philosopher is a thread and the chopsticks are shared objects.

  Create a class that inherits from your pizzaorder class

Create a class that inherits from your PizzaOrder class called SeatedPizzaOrder. SeatedPizzaOrder has the three data values that any PizzaOrder has (size, toppings, and price) but also has a tablenumber (of type integer) and serverName (of type st..

  Java statement to initialize a variable square

Write a Java statement to initialize a variable square with a rectangle object whose top left corner is (10, 20) and whose sides all have length 40. Then write a statement that replaces square with a rectangle of the same size and top left corner ..

  Write a program that gets input for a string

Proper coding conventions required the first letter of the class start with a capital letter and the first letter of each additional word start with a capital

  Java program for real estate agent

Write down java program for real estate agent. Program must perform the following tasks: ask users for average house price for the each of past 5 years for single family residence of 1500 square feet.

  Describe a potential consequence of that declaration

Pick one of the following declarations and discuss why the variable name is "bad." Describe a potential consequence of that declaration.

  Review communication between classes

Review Communication between Classes in preparation for the assignment - make sure you protect your class variables and provide access to them though methods

  Write a program that converts yards to the number of feet

Write a program that converts yards to the number of feet, as well as the number of inches (e.g., there are 10.5 feet in 3.5 yards, and there are 126.0 inches in 3.5 yards).

  Web-based medical centre administration system

COIT20273 - Application Development Project - Software Design and Development Project - Project Plan and Requirement Specifications

  Calculate the number of mantissa digits

Using a technique explained in the class, calculate the number of mantissa digits and the unit round-off on the machine that you will use for this course.

  Object oriented programming-getting started with classes

Suppose you are car shopping and want to store information about possible choices. Model, and implement an automobile class. Use a UML drawing tool such as Umbrello or Microsoft Visio to create a class diagram. Your class should have at least cons..

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