CS508 Assignment 2 Solution 2020

0
294
CS508 Assignment 2 Solution 2020

 

CS508 Assignment 2 Solution Assignment No. 02
Semester Spring2020
CS508- Modern Programming Languages
 

Total Marks: 20

 

Due Date:12 June 2020

Instructions

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.

 

Submission details CS508 Assignment 2 Solution

Following files must be submitted in a single zip or rar file.

·         Code file(.adb file)

·         A .gif file which shows working of your application (For Recording .gif a software named Screentogif is uploaded on LMS, or you can use any other gif recording tool as well)

Please note if you submit a doc or txt file you will be awarded 0 marks. Make sure to write your own VU ID in the assignment file(s) otherwise assignment not accept.

Click Here:

CS508 Assignment 2 Solution Download

 

If you do not submit any of the above-mentioned files 50% marks per file will be deducted.

Objective

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.

Problem Statement:

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.
You are require to create a tagged type as a person and then another as men. the tagged type men will inherit from person type.

The person typically has the following attributes:

Name: String

Age: Integer

Gender: Boolean

 

Functions:

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

Functions:

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

Click Here: