Question: Assignment 1 Task 1 Instructions Create one java file named Task1.java. Inside of this file, create a class named Task1. Inside of the class


Assignment 1 Task 1 Instructions Create one java file named Task1.java. Inside of this file, create a class named Task1. Inside of the class Task1, create a main method that: Asks the user for 2 numbers and an arithmetic operator. (3 pieces of information in total). Then perform the arithmetic operation. Accept 4 operators. Use if statements. Do not check for validation. Sample of Program Enter a first number: 100 Enter a second number: 200 Enter an arithmetic operator (+, -, *, /) : + Result of: 100+ 200 = 300 *** Please note that you should ask for two numbers, then a symbol to avoid unexpected behavior. *** Total: 5 marks Tasks 2 & 3 Instructions Create two classes named House and House Runner. You will be instructed below what to code in those classes. Task 2 In the House class, create 3 instance variables with unique data types and unique accessibility levels. Create 7 constructors for this class (including the default constructors). Total: 10 marks Task 3 In the HouseRunner class, code a main method (that is, ensure the main method exists). In the main method, instantiate the House object in 3 unique ways (using 3 of the 7 possible constructors). Using printf(), output the values of all three instance variables of the 3 House objects. There should be 3 printf() statements and each printf() statement should output the 3 individual instance variables. Total: 5 marks Submission Submit 3 individual .java files on Blackboard: Task1.java, House.java, HouseRunner.java The package name is up to you. To view the individual files, right-click on any java file, select the option Open In, then choose the options Explorer (if you're on Windows) or Finder (if you're on Mac)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
