|CS508 Assignment 2 Solution Assignment No. 02 |
Semester Spring2020CS508- Modern Programming Languages
Total Marks: 20
Due Date:12 June 2020
Please read the following instructions carefully before solving & submitting an assignment CS508 Assignment 2 Solution:
It should be clear that your assignment will not get any credit if:
The assignment is submitted after the due date.
The submitted assignment does not open or file is corrupt.
The assignment is completely or partially copied from (other student or ditto copied from handouts or the internet).
Student ID is not mentioned in the assignment File or the name of the file is other than student ID.
The assignment is not submitted in .rar format.
If you do not submit any of the above-mentioned files 50% marks per file will be deducted.
The objective of this assignment is to give students ideas on how to implement object-oriented concepts in ADA.
Lectures Covered: This assignment covers Lecture # 13 – 17
You will develop an Ada console application in GNATIDE. You can also use any online compiler to compile Ada.
As you know that we cannot implement inheritance in Ada directly as there is no concept of class in Ada, we need to use a mix of tagged types and packages.
The person typically has the following attributes:
And also a function named print()[This function will print all three attributes of type person]
The tagged type men have the following attributes
· Height: float
· ID: String
This type will also have one function named print() which must print all the attributes of type men and person as well.
When the application starts an instance of type men will be created and detail of men will be taken from user input and assigned to men type object after that the added details will be printed on the console screen.
CS508 Assignment 2 Solution Download