Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

code in java, You are Given the UML of the two classes, and the main class. There are five syntax errors in the main. Find

code in java, image text in transcribed
You are Given the UML of the two classes, and the main class. There are five syntax errors in the main. Find the error, and explain why it is wrong. P.S: do not correct error. You have to explain why there is an error. Human age: int name: Name + Human(A:int, a:Name) + equals(other:Obiect): boolean Name first: String last: String +Name($1:String,s2-String) + toString(): String 1 2 3 4 5 6 7 8 9 10 11 12 public class Exercise public static void main(String[] args) { Human hl= new Human(); Human h2 new Human (23, new Name ("John Doel Human h3 = new Object Human h4 Object ol - new Object 03 Object 02 new Human (22, new Name{"Rodney", "Rod")); System.out.println (h2.aget" "+h2.name); System.out.println(h2.toString(); System.out.printlnthi.tostring(): System.out.println(equals (hl, ol)); System.out.println (h2.equals(2)}; 13 14 15 Put your answers here: Line with Error Explanation (Why it is wrong)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

More Books

Students also viewed these Databases questions