We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>


Looking For Something at vustudents.ning.com? Click Here to Search

Assignment No. 02
Semester: Fall  2016
Modern Programming Languages – CS508

 

Total Marks: 20

 

Due Date: Dec. 06, 2016

Lectures Covered: 13 to 17.

 

Objectives:

            Understand and get hands on experience of:

  • Ada GIDE programming tool for Ada language
  • Package/ Enumeration, Array, Loop, Switch-case in Ada Language

 

Instructions:

Please read the following instructions carefully before submitting assignment:

It should be clear that your assignment will not get any credit if:

 

  • The assignment is submitted after due date.
  • The assignment is submitted via email.
  • The assignment is copied from Internet or any other student.
  • The submitted assignment does not open or file is corrupt.
  • It is in some format other than .adb (Ada Language Code File).

 

Note: All types of plagiarism are strictly prohibited.

 

For any query about the assignment, contact at cs508@vu.edu.pk

 

 

 

1. You are required to write a program in Ada programming language which will get the name of Fruit from user and display its price on screen.

 

 

Assignment Instructions:

You are required to consider following fruits in your program.

Apple, Grapes, Banana, Pineapple, Pomegranate, Mango, Cherry, Melon, Strawberry, Orange and Peach.

  • If the selected fruit is Apple, Pineapple, Pomegranate or Grapes then price should be 200.
  • If the selected fruit is Banana or Mango then price should be 150.
  • If the selected fruit is Cherry, Strawberry or Orange then price should be 100.
  • For all other fruits the price should be 50.

 

Hints: You should use array to save the names of fruits. Use switch case to match user input (fruit name) with fruits saved in array. Use the loop to repeat this process again and again as shown in output screen.

 

 

 

 

 

 

 

Output Screenshot:

 

 

Assignment Submission Instructions:

For detail regarding programming tool for Ada language see announcement. Write your program in given tool and submit .adb file from your LMS account.

As you know, the procedure name in Ada code and Ada program’s file name should be same. So use Main for procedure and file name. As showing in below screen shot.   

Please note that due date of assignment will not extend, so do not wait for last date and submit your solution as quickly as possible.

Due Date: Tuesday, December 06, 2016.

Share This With Friends......

+ Click Here To Join also Our facebook study Group.

This Content Originally Published by a member of VU Students.

+ Prohibited Content On Site + Report a violation + Report an Issue


..How to Join Subject Study Groups & Get Helping Material?..


Views: 3873

See Your Saved Posts Timeline

Attachments:

Replies to This Discussion

Only 2 days left now can any buddy discuss in this assignment

very asan ye tu  :)

This is Just For Idea Not Soulation

WITH Ada.Text_IO;
USE Ada.Text_IO;
WITH Ada.Integer_Text_IO;

PROCEDURE NewFurits IS

Choice : Integer;

BEGIN

Put_Line("1 For apple ");
Put_Line("2 For Orange ");
Put_Line("3 For Pineapple ");
Put_Line("Enter Your Choice : ");
Ada.Integer_Text_IO.Get(Choice);

CASE Choice IS

WHEN 1=>
Put_LIne("Apple Price is 200");
WHEN 2=>
Put_Line("Orange Price is 100");
WHEN 3=>
Put_Line("Pineapple price is 300");
WHEN OTHERS=>
Put_Line("Your Entered Fruite is not Found");

END CASE;
END Newfurits;

how to run this code :(

Online Compiler for CS508 Assignment # 2
https://www.tutorialspoint.com/compile_ada_online.php

yrrrr ye code run kesy krty hain ks m bnana h issyyyyyyyyy

aoa .kndly ye btai k is assignment ka code ks software me lkhna ha .c,c+ me ks program me .ada language ko kesi download kre .

jo me ne install kia hy wo run ni ho ra.

lms pe adagide jo dia hy wo run ni ho ra hy

bhai ada gide install kero phr gps(gnat programming studio) download kero phr dono install kero phr aap ka adagide chaly ga

Any one have any idea please share.....!

http://lms3.vu.edu.pk/CourseResources/OpenFile.aspx?File=GPS%20(GNAT%20Programming%20Studio).rar

http://lms3.vu.edu.pk/CourseResources/OpenFile.aspx?File=Ada%20Gide...

yeh dono software download kere phr ada gide open ker ke us main code likhna hai

RSS

Study Corner For DigiSkills Students

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service