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

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.


Instructions

Please read the following instructions carefully before solving & submitting assignment:

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

  • The assignment is submitted after due date.
  • The submitted assignment does not open or file corrupt.
  • The assignment is full or partially copied from (other student or ditto copy from handouts or internet).
  • Student ID is not mentioned in the assignment File or name of file is other than student ID.

Uploading instructions

Your submission must include:

 

  • Assignment should be in .doc or docx format.
  • Save your assignment with your ID (e.g. bx020200786.doc).
  • Assignment submission through email is highly discouraged

Objective

The objective of this assignment is

  • To give some comparison, knowledge of syntax of Prolog and Java programming languages. It will also enable students how to write simple programs in Prolog and Java programming languages.

 

Note:

Your answer must follow the below given specifications.

  •  Font style: “Times New Roman”
  •  Font color: “Black”
  •  Font size: “12”
  •  Bold for heading only.
  •  Font in Italic is not allowed at all.
  •  No formatting or bullets are allowed to use.
  • Your answer should not exceed 10 lines each.

 

Lectures Covered: This assignment covers Lecture #  22-34

Deadline

Your assignment must be uploaded/submitted at or before 18/02/2015.

 

Question No. 01:

  1. a.   Following is the family relationship tree. You are required to write the resultant clauses of PROLOG using variables like male, female, siblings and child_of. Also write queries for the following:          Marks: [4+4]
    1. Is “Waseem” the parent of “Ali”?
    2. Who is the parent of “Sara”?
    3. Is “Ali” is parent of “Saad”?
    4. Who is the child of “Waqas”?

 

                                                                              

    

       b. Write PROLOG code to compute “Fibonacci series” of any number “n”.                                    Marks: 04

 

Question No. 02:

 

Java is a real object oriented programming language which is quite similar to C++ and is significantly simplified than C++. Write the equivalent java code for the given C++ code which producing the same results following the same class structure.                                                                                                                                   Marks : 08

 

#include <iostream>


class Rectangle: public Shape
{

  int width, height;

  public:

    Rectangle ();

    Rectangle (int, int);

    int calculateArea (void)  { return (width*height); }

 };

 

Rectangle::Rectangle (int a, int b) {

 width = a;

height = b;

 }

 

int main () {

    int num1, num2;

    cout" Enter the length of the rectangle: ";

    cin>>num1;

    cout" Enter the width of the rectangle: ";

    cin>>num2;

  Rectangle rect (num1,num2);

  cout "Area of Rectangle:  " rect.calculateArea() endl;

  system("pause");

  return 0;

}

           

=====================================Ended=======================================

 

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

GOOD LUCK

+ How to Follow the New Added Discussions at Your Mail Address?

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

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 1451

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

plz start the discussion 

Please Discuss here about this assignment.Thanks
Our main purpose here discussion not just Solution
We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions.

Share the idea          today is last date............

O forgot

Q#1 part 2 queries.

Who is the parentof Sara?
parent (sara,saad)

sara ka parent to saad ha fir X ku aya ha

or
Who is the child of waqas?
Asad

is mn b X aya ha

ye X ku a raha ha plzzzzzzzz bata do CodeRed

 ▄▀▄▀ Haya ▄▀▄▀ 

ye code lkhny ka process hy Prolog mn. 

when we uze who r somthing is the parent or child then we hav to use X. 

u can understand thz by reading pg 79 of handouts.

PLZZ FULL SOLUTION BTA DO...

Q#1 part(a)

RSS

Latest Activity

Rabia Imran posted a status
"where is the solution of 1st assignment cs301"
9 minutes ago
Rabia Imran liked Shahid's profile
12 minutes ago
Wajahat Ali replied to +M.Tariq Malik's discussion CS625 Professional Practices Assignment No 01 Spring 2020 Solution & Discussion in the group CS625 Professional Practices
27 minutes ago
Wajahat Ali joined +M.Tariq Malik's group
27 minutes ago
+ Faisal + replied to +¢αяєℓєѕѕ gιяℓ's discussion CS506 - Web Design and Development Assignment # 1 Due Date Jun 06, 2020 in the group CS506 Web Design and Development
32 minutes ago
Profile Icon+ Faisal + and zisani joined +M.Tariq Malik's group
32 minutes ago
+ ! ! ! ! ! ! !ςu††ïε ! ! replied to CUTE MUNDA's discussion cs 601 assignment 1 solution spring 2020
40 minutes ago
Profile Icon+ ! ! ! ! ! ! !ςu††ïε ! ! and Saif ur rehman joined +M.Tariq Malik's group
48 minutes ago
+ ! ! ! ! ! ! !ςu††ïε ! ! replied to Habiba's discussion CS604 Assignment No. 1 Spring 2020 Due date 02-06-2020 in the group CS604 Operating Systems
52 minutes ago
+ ! ! ! ! ! ! !ςu††ïε ! ! replied to +¢αяєℓєѕѕ gιяℓ's discussion MGT211 - Introduction To Business GDB No. 1 Due Date Wednesday, June 03, 2020 in the group MGT211 Introduction To Business
52 minutes ago
+ ! ! ! ! ! ! !ςu††ïε ! ! joined +M.Tariq Malik's group
53 minutes ago
+ ! ! ! ! ! ! !ςu††ïε ! ! joined +M.Tariq Malik's group
54 minutes ago

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

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

.