.CPP File Code
using namespace std; #include <stdlib.h> #include <iostream> struct StudentDetail{ string name; string vuid; }; //class Node* head; class Node{ struct StudentDetail newStd; class Node* next; class Node* prev; void Set(string name,string vuid) { newStd.name=name; newStd.vuid=vuid; } Node Get() { } void setNext(string name,string vuid){ if(next==NULL) { } else { class Node* newNode= new Node(); newStd.name=name; newStd.vuid=vuid; newNode->next= newNode; } } string getNext() { next; } void setPrev(string name,string vuid){ if(next==NULL) { } else { class Node* newNode= new Node(); newStd.name=name; newStd.vuid=vuid; newNode->next= newNode; } } string getPrev() { prev; } }; class DoublyLinkedList{ public: struct StudentDetail newStd; class DoublyLinkedList* headPtr; class DoublyLinkedList* curPtr; class DoublyLinkedList* nextPtr; int size; //dfdf class DoublyLinkedList* headDlinkList=NULL; void addAtBegining(string vuid, string name) { class DoublyLinkedList* dNode= new DoublyLinkedList(); dNode->newStd.vuid=vuid; dNode->newStd.name=name; dNode->nextPtr=headDlinkList; headDlinkList= dNode; dNode->curPtr=dNode; } void addAtEnd(string vuid, string name) { class DoublyLinkedList* dNode= new DoublyLinkedList(); dNode->newStd.vuid=vuid; dNode->newStd.name=name; dNode->nextPtr=headDlinkList; headDlinkList= dNode; dNode->curPtr=dNode; } void delNode() { class DoublyLinkedList* temp1=curPtr; class DoublyLinkedList* temp2= temp1; temp1->nextPtr= temp2->nextPtr; free(temp2); } void print() { class DoublyLinkedList* temp= headDlinkList; while(temp!=NULL) { cout<<temp->newStd.vuid<<" "<<temp->newStd.name<<endl; temp= temp->nextPtr; } } }; int main() { string vuid,name; cout<<"Add your vuID and Name at First Position "<<endl; cout<<"_ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ __ _ _"<<endl; DoublyLinkedList dlist1; cin>>vuid; cin>>name; dlist1.addAtBegining(vuid,name); dlist1.print(); cout<<"Insertion At Beginning in doubly Link List "<<endl; cout<<"_ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ __ _ _"<<endl; cin>>vuid; cin>>name; dlist1.addAtBegining(vuid,name); dlist1.print(); cout<<"Insertion At End in doubly Link List "<<endl; cout<<"_ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ __ _ _"<<endl; cin>>vuid; cin>>name; dlist1.addAtEnd(vuid,name); dlist1.print(); cout<<"Deletion of Current Node (Last Node) "<<endl; cout<<"_ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ __ _ _"<<endl; dlist1.delNode(); dlist1.print(); }MTH601 Assignment 1 Solution and Discussion
-
@zaasmi
Correct Solution!
-
Assignment: 1 Solution MTH601 (Fall 2019)
Question:
Construct a table which shows the relationship between the activities and their predecessors.Activities predecessors A - B - C A D B E C F A,C,D G E,F -
Calculate the following time estimates for each activity.
-
Earliest Start Time (EST)
-
Earliest Finish Time (EFT)
-
Latest Start Time (LST)
-
Latest Finish Time (LFT)
ACTIVITY EST EFT LST LFT A 0 3 2 5 B 0 5 0 5 C 3 5 5 7 D 5 9 5 9 E 5 10 7 12 F 9 12 9 12 G 12 18 12 18 ACTIVITY EST EFT LST LFT A 0 3 2 5 B 0 5 0 5 C 3 5 5 7 D 5 9 5 9 E 5 10 7 12 F 9 12 9 12 G 12 18 12 18 - Calculate the total float for each activity.
Ans:
ACTIVITY FLOAT A 2 B 0 C 2 D 0 E 2 F 0 G 0 -
Identify the critical path.
Ans:
B + D + F +G = 5 + 4 + 3 + 6 = 18 days -
Find the project completion time.
Ans: The project completion time is 18days.
-
-
-
-
@zareen said in MTH601 Assignment 1 Solution and Discussion:
Calculate the following time estimates for each activity.
Earliest Start Time (EST)
Earliest Finish Time (EFT)
Latest Start Time (LST)
Latest Finish Time (LFT)
Calculate the total float for each activity.
Identify the critical path.
Find the project completion time.
-
@zareen said in MTH601 Assignment 1 Solution and Discussion:
Construct a table which shows the relationship between the activities and their predecessors.
-
-
Just for ideas solution for mth601 assignment
Recent Topics
-
CS502 Midterm Solved Papers Mid and Final
CS502 - Fundamentals of Algorithms6 -
CS301 Quiz 1 Solution and Discussion
CS301 – Data Structures5 -
UNSOLVED MTH404 Assignment 2 Solution and Discussion
MTH404 - Dynamics5 -
org.jetbrains.kotlin.util.KotlinFrontEndException: Exception while analyzing expression
Android Development4 -
SOLVED MTH304 Assignment 2 Solution and Discussion
MTH304 - Statics4 -
STAT408 Assignment 1 Solution and Discussion
STAT408 - Experimental Design Analysis4 -
CS101 Mid Term Solved Papers by Moaaz
CS101- Introduction to Computer2 -
SOLVED CS510 Assignment 1 Solution and Discussion
CS510 - Software Requirements and Specifications2 -
SOLVED BNK603 Assignment 1 Solution and Discussion
BNK603 - Consumer Banking2 -
SOLVED CS510 Assignment 2 Solution and Discussion
CS510 - Software Requirements and Specifications2 -
UNSOLVED BIF501 Assignment 1 Solution and Discussion
BIF501 - Bioinformatics II2 -
SOLVED MTH621 Assignment 1 Solution and Discussion
MTH621 - Real Analysis I2 -
BIO731 Assignment 1 Solution and Discussion
BIO731 - Advanced Molecular Biology1 -
BT734 Assignment 1 Solution and Discussion
BT734 - Research Methods in Biotechnology1 -
MTH101 Assignment 1 Solution and Discussion
MTH101 - Calculus And Analytical Geometry1 -
BT731 Assignment 1 Solution and Discussion
BT731 - Modern Biotechnology: Principles & Applications1 -
BT735 Assignment 1 Solution and Discussion
BT735 - Advances in Fermentation Technology1 -
GEN733 Assignment 1 Solution and Discussion
GEN733 - Biometrical Techniques in Genetics1 -
BNK603 Quiz 2 Solution and Discussion
BNK603 - Consumer Banking1 -
PM Modi Fallon on stairs
General Discussion1