Skip to content
  • 0 Votes
    3 Posts
    268 Views
    zaasmiZ

    @zaasmi said in CS201 Assignment 2 Solution and Discussion:

    code please?

    #include<iostream> using namespace std; // Declaration of function showElements void showElements(long s[][4]); // Declaration of function PercentageDeath void PercentageDeath(long s[][4], int i); // Declaration of function PercentageRecovered void PercentageRecovered(long s[][4], int i); main() { cout<<"\n\nCS201 Assignment No. 2 Solution \n\n"; long source_data[7][4]= {0,560433, 22115, 32634, 1,156363, 19899, 34211, 2,84279, 10612, 0, 3,82160, 3341, 77663, 4,71686, 4474, 43894, 5,56956, 1198, 3446, 6,5374, 93, 109}; showElements(source_data); int user_choice; do { cout<<"\nPress the country code to calculate percentage of dead and recovered persons\n"; cout<<"\n*** Press 0 for Pakistan ***"; cout<<"\n*** Press 1 for China ***"; cout<<"\n*** Press 2 for Italy ***"; cout<<"\n*** Press 3 for UK ***"; cout<<"\n*** Press 4 for Iran ***"; cout<<"\n*** Press5 for France ***"; cout<<"\n*** Press 6 for Turkey ***"; cout<<"\n*** Press 7 to Exit ***"; cout<<"\n\nPlease select an option use number from 0 to 7 : "; input: cin>>user_choice; if(user_choice>=0 && user_choice<=6) { PercentageDeath(source_data, user_choice); PercentageRecovered(source_data, user_choice); } else if(user_choice<0 || user_choice>7) { cout<<"\n\nChoice should be between 0 to 7 "; cout<<"\ninvalid choice ! please select again : "; goto input; } }while(user_choice!=7); } // definition of function showElements void showElements(long s[][4]) { cout<<"Source Data : \n\n"; cout<<"Country\tCases\tDeaths\tRecovered\n\n"; for(int i=0; i<7; i++) { for(int j=0; j<4; j++) { cout<<s[i][j]<<"\t"; } cout<<"\n"; } } // definition of function PercentageDeath void PercentageDeath(long s[][4], int i) { float d_rate=(float)100*s[i][2]/s[i][1]; cout<<"\nPercentage of death is "<<d_rate; } // definition of function PercentageRecovered void PercentageRecovered(long s[][4], int i) { float r_rate=(float)100*s[i][3]/s[i][1]; cout<<"\n\nPercentage of recocered is "<<r_rate<<"\n"; }
  • 0 Votes
    2 Posts
    186 Views
    zareenZ
    #include<iostream> using namespace std; class TNode{ private: node* root; public: TNode(); int isEmpty(); void buildTree(int item); void insert(int item,node *,node *); void minNode(node*); void maxNode(node*); int countNodes(node*); int treeHeight(node*); void displayBinTree(); }; TNode::TNode(){ root = NULL; } int TNode::isEmpty() { return (root == NULL); } void TNode::buildTree(int item){ node *p = new node; node *parent; cout <<"Insert node in BST :" << item <<endl; insert(item,p,parent); } void TNode::insert(int item,node * p,node * parent){ p->data=item; p->left=NULL; p->right=NULL; parent=NULL; if(isEmpty()){ root = p; } else{ node *ptr; ptr = root; while(ptr != NULL){ parent = ptr; if(item > ptr->data){ ptr = ptr->right; } else{ ptr = ptr->left; } } if(item < parent->data){ parent->left = p; } else{ parent->right = p; } } } void TNode::minNode(node* p){ while (p->left != NULL){ p = p->left; } cout << "Minimum value : " << p->data <<endl; } void TNode::maxNode(node* p){ while (p->right != NULL){ p = p->right; } cout << "Maximum value : " << p->data <<endl; } int TNode::countNodes(node* p){ int node = 1; //Node itself should be counted if (p == NULL){ return 0; } else{ node += countNodes(p->left); node += countNodes(p->right); return node; } } int TNode::treeHeight(node* p){ if (p == NULL) { return 0; } else { int left_side = treeHeight(p->left); int right_side = treeHeight(p->right); if (left_side > right_side) { return(left_side + 1); } else { return(right_side + 1); } } } void TNode::displayBinTree(){ cout <<endl<<endl; minNode(root); maxNode(root); cout <<"Height of BST : "<<treeHeight(root); cout <<"\nTotal nodes : "<<countNodes(root); } int main(){ TNode b; int data[] = {7,2,9,1,5,14}; cout <<"Constructing Binary Search Tree by Inserting Nodes One by One "<<endl; cout <<"------------------------------------------------------------- "<<endl; int arrSize = sizeof(data)/sizeof(data[0]); for(int i = 0; i < arrSize; i++) { b.buildTree(data[i]); } }
  • 0 Votes
    2 Posts
    431 Views
    zaasmiZ

    11bf63b2-4d58-4470-bda8-51c1f310223e-image.png dab411a1-d5e6-4659-9246-4db1fb98ac14-image.png 0ba639b3-6c8c-4dbc-8d14-9d91a17e1f73-image.png e0d4f9ce-f6d1-4fee-ad85-fa9acaf07bb7-image.png 11cabe36-55d7-4de3-834d-e597b298ae75-image.png e999b982-4d2b-4ff8-80aa-4ca7e970da20-image.png 45bb2cdb-cae1-4a24-8cdb-1c3552d8e24b-image.png

  • 0 Votes
    2 Posts
    388 Views
    zaasmiZ

    @zaasmi said in CS625 Assignment 1 Solution and Discussion Spring 2020:

    You have studied the Structure of Organizations in detail in lectures of week#3. In this assignment, you
    have to choose any large national or multinational organization of your choice (for example, PCB, Pepsi,
    PTV, Unilever, P&G, Dawlence, HBL, UBL, etc.) and explain its organizational structure in detail.
    Format of your solution should be as under:
    • Name of the Organization
    • Legal form of the Organization
    • Type of the Organization
    • Constitution of the Organization
    • Stakeholders of the Organization
    • Functional Units of the Organization
    • Administrative structure
    • Employees hierarchy
    • Revenue Generation
    • Types of Expenses

    Format of your solution should be as under:

    • Name of the Organization
    o Virtual University of Pakistan
    • Legal form of the Organization
    o Came into existence through an Act of Parliament (VU Ordinance) in 2002.
    • Type of the Organization
    o Federally Chartered Public Sector University
    • Constitution of the Organization
    o VU is owned by the Govt. of Pakistan (supervised by Ministry of Information Technology)
    • Stakeholders of the Organization
    o Govt. of Pakistan
    o Employees of the University
    o Students of the University
    o Affiliated Campuses
    • Functional Units of the Organization
    o Academic departments for delivering education
    o Administrative departments for supervision and control
    o Technical departments for providing technical and logistic support
    • Administrative structure
    o Chancellor (President of Pakistan)
    o Board of Governors
    o Rector (Chief Executive and Chief Academic Officer)
    o Executive Council
    o Academic Council
    o etc.
    • Employees hierarchy
    o Rector (Chief Executive and Chief Academic Officer)
    o Principal Officers > Managers > Supervisors > Officers > Clerical Staff
    o Professors > Associate Professors > Assistant Professors > Lecturers > Instructors
    • Revenue Generation
    o Tuition Fee collected
    o Govt. Funds
    o etc.
    • Types of Expenses
    o Employees’ Salaries
    o Utility Bills
    o Rental cost
    o etc.

  • 0 Votes
    3 Posts
    2k Views
    zaasmiZ

    Solution 100% outer = 1 OUTLOOP OUTPUT = 'Outer ' outer outer = outer + 1 iner = 1 INLOOP OUTPUT = 'Iner ' iner iner = iner + 1 LE(iner, 22) : S(INLOOP) LE(outer, 11) : S(OUTLOOP) OUTPUT = 'My id is BC120401122' END
  • 0 Votes
    4 Posts
    306 Views
    zaasmiZ

    @zaasmi said in CS401 Assignment 1 Solution and Discussion Spring 2020:

    Q 3. Calculate the offset when the physical address is 003Ch and the contents of segment register are 003Ah. (8)

    Solution:
    Physical address = (Segment Address0x10) + Offset address.
    Offset Address = Physical address – (Segment Address0x10).
    = 0003Ch – (003Ah*0x10)
    = 0003Ch - 003A0h
    = FC9Ch

  • 0 Votes
    2 Posts
    148 Views
    zaasmiZ

    CS001 VU-Computer Proficiency License Assignment 2 Solution & Discussion Spring 2020

    CS001 Assignment 2 Solution idea:

    Computer Proficiency License

    (CS001)

    Assignment # 02

    Total marks = 15 Deadline Date 15th June 2020

    Question No 01 7 marks

    Suppose you are working as an IT manager in an IT and electronics company; you are required to write a commercial sales letter to one of your customers (Letter format has been well explained through a template/figure below) using Microsoft Word.

    Consider the following requirements while writing the letter:

    Insert the system date at the specified location.
    Insert a permission request for your team for the installation of the network and UPS.
    Insert a table stating the customer’s complete order details.

    Solution:

    Dear Sir,

    Wednesday,June 10,2020

    Thank you for your electronics goods order

    Sr. No Description Unit Price Quantity Total Price 1 Hp Laptop i7 70,000 10 700,000 2 APCSmart-UPS 1500VA 2U Rack Mount 18,000 2 36,000 Total 736,000

    The two person team bearer of this letter is deputed to attend the installattion and networking, work at your premises, kindly extent them necessary and oblige.

    Your faithfully,

    Name VU ID

    IT Manager, XYZ electronics, Rawalpindi.

    Question No 02 8 marks

    Write the keyboard shortcut keys for the following actions in Microsoft Word:

    Solution:

    Sr. No Action Shortcut key 1 Search a document Ctrl+F 2 Justify a paragraph Ctrl+J 3 Decrease font size Ctrl+[ 4 Bulleted list Ctrl+Shift+L 5 Open the Font dialog box Ctrl+Shift+F 6 Increase font size Ctrl+] 7 Switch to the next window Alt+Tab 8 Insert a copyright symbol Ctrl+Alt+C
  • 0 Votes
    12 Posts
    517 Views
    Dua ZahraD

    @cyberian which assaignment

  • 0 Votes
    12 Posts
    305 Views
    zareenZ

    Requirement 1:
    5ab7b159-dbec-4564-91c6-b731117982fe-image.png 48ee42ba-9fe4-4b3c-b0ea-facf236745a6-image.png be1bf3f5-da6c-455a-8c75-c2ded9586fd2-image.png 30f4a599-96c8-417c-b23d-7097f7e8f4a4-image.png
    02fe3808-5bc3-4898-ab25-b36f106206bb-image.png

    Requirement 2:
    07e098b5-5f3c-4f38-889f-30919a67d9de-image.png b2895999-7c4c-45ce-a089-4bdc70cbb0c2-image.png

    c9ccc6a8-3267-4987-a411-76fef8792c98-image.png ef2eada2-c3e2-4d05-9537-d76bd8d94cb6-image.png

  • 0 Votes
    3 Posts
    158 Views
    zaasmiZ

  • 0 Votes
    5 Posts
    282 Views
    zaasmiZ

    @zaasmi said in MGT301 GDB 1 Solution and Discussion:

    As per the given case, which “ONE” of the following three demand situations do you think “Dettol” is currently facing and which strategies you think it should immediately employ to retain its target customers.

    Full Demand.
    Where demand is equal to supply

    Irregular Demand.
    Sometime increase the demand and sometime enhance supply but not equal

    Overfull Demand.
    Where demand is too much but not supply to more

  • 0 Votes
    3 Posts
    385 Views
    zareenZ

    @zareen said in EDU302 Assignment 2 Solution and Discussion:

    What is meant by cognitive development? Describe four stages of Piaget’s theory of cognitive development in detail? (2+8)

    Q.2 Idea Solution
    Cognitive Development Definition

    Cognitive development is the study of childhood neurological and psychological development. Specifically, cognitive development is assessed based on the level of conception, perception, information processing, and language as an indicator of brain development. It is generally recognized that cognitive development progresses with age, as human awareness and understanding of the world increases from infancy to childhood, and then again into adolescence. The process of cognitive development was first described by Jean Piaget, in his Theory of Cognitive Development.
    Piaget’s four stages

    Piaget’s stages are age-specific and marked by important characteristics of thought processes. They also include goals children should achieve as they move through a given stage.
    Stage Age Characteristics Goal
    Sensorimotor Birth to 18–24 months old Motor activity without use of symbols. All things learned are based on experiences, or trial and error. Object permanence
    Preoperational 2 to 7 years old Development of language, memory, and imagination. Intelligence is both egocentric and intuitive. Symbolic thought
    Concrete operational 7 to 11 years old More logical and methodical manipulation of symbols. Less egocentric, and more aware of the outside world and events. Operational thought
    Formal operational Adolescence to adulthood Use of symbols to relate to abstract concepts. Able to make hypotheses and grasp abstract concepts and relationships. Abstract concepts
    Sensorimotor

    The sensorimotor stage covers children ages birth to 18–24 months old. Characteristics include motor activity without use of symbols. All things learned are based on experiences, or trial and error.

    The main goal at this stage is establishing an understanding of object permanence — in other words, knowing that an object still exists even if you can’t see it or it’s hidden.
    Preoperational

    The preoperational stage can be seen in children ages 2 through 7. Memory and imagination are developing. Children at this age are egocentric, which means they have difficulty thinking outside of their own viewpoints.

    The main achievement of this stage is being able to attach meaning to objects with language. It’s thinking about things symbolically. Symbolic thought is a type of thinking where a word or object is used to represent something other than itself.
    Concrete operational

    Children are much less egocentric in the concrete operational stage. It falls between the ages of 7 to 11 years old and is marked by more logical and methodical manipulation of symbols.

    The main goal at this stage is for a child to start working things out inside their head. This is called operational thought, and it allows kids to solve problems without physically encountering things in the real world.
    Formal operational

    Children 11 years old and older fall into Piaget’s formal operational stage. A milestone of this period is using symbols to understand abstract concepts. Not only that, but older kids and adults can also think about multiple variables and come up with hypotheses based on previous knowledge.

    Piaget believed that people of all ages developed intellectually. But he also believed that once a person reaches the formal operational stage, it’s more about building upon knowledge, not changing how it’s acquired or understood.

  • 0 Votes
    8 Posts
    416 Views
    zaasmiZ

    What may be the possible reasons for missing observations in RCBD and why we need to compute the Efficiency of RCBD relative to CRD? Write he mathematical model of the Latin Square Design.

  • 0 Votes
    2 Posts
    164 Views
    zaasmiZ
    <html> <title></title> <body> <h1><U>Student Profile Form</U></h1></div> <form action="form.php" method="POST"> <table> <tr> <td width="50%">Student ID </td> <td width="50%"><INPUT TYPE = "text" NAME="sID"></td> </tr> <tr> <td width="50%">Form No </td> <td width="50%"><INPUT TYPE = "Number" NAME="fNO"></td> </tr> <tr> <td width="50%">Name</td> <td width="50%"><INPUT TYPE = "text" NAME="sName" ></td> </tr> <tr> <td width="50%">Current Semester</td> <td width="50%"><INPUT TYPE = "text" NAME="cSem"></td> </tr> <tr> <td width="50%">CGPA</td> <td width="50%"> <INPUT TYPE = "Number" NAME="sCGPA"></td> </tr> <tr> <td width="50%">Entery Test Qualified</td> <td width="50%"><input type="radio" name="ETQ"> Yes <input type="radio" name="ETQ"> No</td> </tr> <tr> <td width="50%">Study Program</td> <td width="50%"><select name="SP" id="SP"> <option value="bs">Please Select</option> <option value="bs">BSCS</option> <option value="mc">MCS</option> <option value="ms">MSCS</option> </select> </td> </tr> <tr> <td width="50%">VU Email</td> <td width="50%"><INPUT TYPE = "Text" NAME="emAddress"></td> </tr> <tr> <td width="50%">Mobile No</td> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> </tr> <tr> <td width="50%">Address</td> <td width="50%"><INPUT TYPE = "Text" NAME="sAddress"></td> </tr> <table> <thead> <tr> <th rowspan="5">Academic Qualifications</th> <th>Certificate/Degree Name</th> <th>Name of Institute</th> <th>Registration Number</th> <th>Obtained Marks/CGPA</th> <th>Total Marks/CGPA</th> </tr> <tr> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> </tr> <tr> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> </tr> <tr> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> </tr> <tr> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> <td width="50%"> <INPUT TYPE = "Number" NAME="sMob"></td> </tr> </thead> </table> <tr> <table> <tr> <td align="center"></td> <td style="text-align:center" width="50%"><INPUT TYPE = "submit" NAME="Submit"></td> <td align="center"></td> <td style="text-align:center" width="50%"><INPUT TYPE = "reset" NAME="Reset"></td> </tr> </table> </form> </body> </html>

    Output

    910339c6-035d-49b6-a32f-facec5566f6d-image.png

  • 0 Votes
    2 Posts
    365 Views
    zaasmiZ

    @zareen said in CS311 Assignment 1 Solution and Discussion:

    Q. Create an internal DTD and XML Document for the XML tree drawn below.
    DTD (10 marks)
    XML Document (10 marks)

    Solution Idea
    DTD:

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE league [ <!ELEMENT league (franchise)> <!ATTLIST league name CDATA #REQUIRED> <!ATTLIST league year CDATA #REQUIRED> <!ELEMENT franchise (team+)> <!ATTLIST franchise name CDATA #REQUIRED> <!ATTLIST franchise owner CDATA #REQUIRED> <!ATTLIST franchise city CDATA #REQUIRED> <!ELEMENT team (win,losses,coach,player+)> <!ELEMENT win (#PCDATA)> <!ELEMENT losses (#PCDATA)> <!ELEMENT coach (#PCDATA)> <!ELEMENT player (name,age,runs,matches)> <!ELEMENT name (#PCDATA)> <!ELEMENT age (#PCDATA)> <!ELEMENT matches (#PCDATA)> <!ELEMENT runs (#PCDATA)> ]>

    XML:

    <?xml version="1.0" encoding="UTF-8"?> <league year="" name=""> <franchise owner="" name="" city=""> <team> <wins></wins> <losses></losses> <coach></coach> <player> <name></name> <age></age> <matches></matches> <runs></runs> </player> </team> </franchise> </league>
  • 0 Votes
    2 Posts
    238 Views
    Wajahat AliW

    Solution.cpp

    #include <graphics.h> // driver code int main() { // gm is Graphics mode which is a computer display // mode that generates image using pixels. // DETECT is a macro defined in "graphics.h" header file int gd = DETECT, gm; int left = 200, top = 20; int right = 430, bottom = 460; // initgraph initializes the graphics system // by loading a graphics driver from disk initgraph(&gd, &gm, ""); setcolor(WHITE); settextstyle(DEFAULT_FONT, HORIZ_DIR, 2); outtextxy(10, 20, (char*)"BC123456789"); setcolor(WHITE); setfillstyle(SOLID_FILL,WHITE); rectangle(left, top, right, bottom); bar(200,20,430,460); setcolor(LIGHTRED); setfillstyle(SOLID_FILL,LIGHTRED); circle(left+100,top+280,50); floodfill(left+100,top+280,LIGHTRED); setcolor(LIGHTGREEN); setfillstyle(SOLID_FILL,LIGHTGREEN); circle(left+160,top+340,30); floodfill(left+160,top+340,LIGHTGREEN); setcolor(LIGHTBLUE); line(left,top+280,right,bottom-20); setcolor(LIGHTGREEN); line(left,top+300,right,bottom); setcolor(LIGHTRED); line(left,top+320,right-30,bottom); getch(); // closegraph function closes the graphics // mode and deallocates all memory allocated // by graphics system . closegraph(); }

    Download Complete Solution