Question: Assignment 4 There are two tasks for this assignment. Task 1 : Please comment on the corresponding parts in the ATypicalJavaProgram.java used in the class.

Assignment 4
There are two tasks for this assignment.
Task 1: Please comment on the corresponding parts in the ATypicalJavaProgram.java used in the class. The ATypicalJavaProgram.java can be found in the moodle attached.
In the class, Weifeng Pan discussed the anatomy of a Java program by providing comments on key sections of the code. Follow Weifeng Pan's example by commenting and modifying the code yourself. Completing this task will give you a better understanding of what a standard Java program should resemble.
Please submit the commented version to Moodle.
Task 2: Thinking, reasoning, and fixing
For details, please refer to the comments in the IdentifiersDemo.java.
Please submit the commented version to Moodle.
Warning: All the materials should be compressed into one file and submitted to Moodle.
package edu.ou.typicaljavaprogram;
interface IWalk {
void walk();
}
class Animal {
public void say(String content){
System.out.println("Animals say ""+
content +"");
}
}
class Dog extends Animal implements IWalk {
private String name = "Wang";
@override
public void say(String content){
System.out.println("Dogs "+ name +"
say ""+ content +""");
}
@Override
public void walk(){
System.out.println("Dogs walk...");
}
}
public class ATypicalJavaProgram {
public static void main(String[] args){
Dog dog= new Dog();
dog.say("I am cute.");
}
}
 Assignment 4 There are two tasks for this assignment. Task 1:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!