Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you answer on python or java language? Thanks!! 1. Write a segment code in any language you prefer that behaves differently if the language

Can you answer on python or java language? Thanks!!

image text in transcribed

1. Write a segment code in any language you prefer that behaves differently if the language used a. structural equivalence (student's answer may vary) two types as the same if they consist of the same components. Example: TYPE T1 = RECORD AINTEGER REARRAY [0..101 oF CHAR: END: TYPE T2RECORD INTEGER h:ARRAY I0..101 OF CHAR: END Types Tl and T2 are equivalent. Algol-68, Modula-3, C, ML use structural type equivalence. b. name equivalence (student's answer may vary) each type declaration introduces a new type, distinct from all others Example: TYPE T1 = ARRAY [Qse10] OF CHAR; TYPE T2 = ARRAY [0w,10] OF CHAR; Types T1 and T2 are not equivalent. Java and Ada use name equivalence. c. declaration equivalence (student's answer may vary) two types are equivalent if they lead back to the same type. Example: TYPE T1 ARRAY 010] OF CHAR YEE Y0a.:101 or ceAr! TYPE T2 = T1; TYPE T3 T2 ; TYPE T4 = ARRAY [lae10] OF CHAR; Types T1, T2, T3 are equivalent. Pascal, Modula-2 use declaration equivalence

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

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

ISBN: 1844804526, 978-1844804528

More Books

Students also viewed these Databases questions

Question

Create a Fishbone diagram with the problem being coal "mine safety

Answered: 1 week ago

Question

How did you feel about taking piano lessons as a child? (general)

Answered: 1 week ago