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

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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