CS508 Assignment Solution # 2nd Fall 2021

CS508 Assignment Solution # 2nd Fall 2021

CS508 Assignment Solution # 2nd Fall 2021

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

Uploading Instructions:

  • You can use a simple Notepad or any other text editor (like Sublime Text, Atom, VS Code etc.) for coding.
  • For compilation purpose, any online compiler can be consulted, like https://tio.run/#snobol4
  • Make sure to write your own VU Student ID at top.
  • After completion, copy all the code; it must be a simple text, which should not contain any format or style.
  • Paste it in text view at Student Inline Solution interface and click on save button.
  • You can update your solution any time but before the deadline.
  • Unlike assignment # 1, you do not need to upload any file at VU-LMS; provide the solution of assignment directly at VU-LMS.
  • After submit, make sure the submitted code is properly visible and in readable form.
  • No assignment will be accepted through email.

Rules for Marking:

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

  • The assignment is submitted after due date.
  • The assignment is not submitted in proper format (i.e., simple text, without any format/style).
  • The assignment is fully or partially copied from other student or ditto copy from handouts or Internet; strict disciplinary action will be taken in this case.
  • The submission contains Student Id other than yours; Zero Marks will be awarded.
  • The submitted code is not readable; during evaluation, submitted code will be checked using simple text editor. If code is not readable due to wrong format or style then ZERO marks will be awarded and no excuse will be accepted in this regard.

Lectures Covered: This assignment covers lectures # 9 to 15.

GOOD LUCK

Problem Statement:

You are required to write a program in SNOBOL4 which will take input from user, store in an array and then print elements of the array in reverse order; the last element should be displayed first, followed by second last element and so on.  

  • At start, write your own VU Student ID using SNOBOL comments.
  • Take a string as input from user.
  • Check input’s length using SNOBOL4 built-in functions as given below; less than 1 or more than 50 characters is an invalid length.
  • Define an array of size 50 and initialize with hyphen “-“.
  • Design a pattern, which should contain alphanumeric characters only (i.e., A to Z, a to z and 0 to 9).
  • Create a loop using ‘Go to field’, which will match characters of input with pattern:
    • If any character is matched then store it in array.
    • Also store that character in a separate variable using concatenation feature.
    • If not matched, then ignore it.
    • Move to the next character.
  • Now create two more loops using ‘Go to field’:
    • First loop will take all elements (except hyphen “-“) from array in original order and store them in a separate variable using concatenation feature.
    • Second loop will also take all elements (except hyphen “-“) from array, but in reverse order, and store them in a separate variable using concatenation feature.
  • At end, simply print all the characters stored in three different variables on console with appropriate message.

For example, if input string is

A quick brown fox jumps over the lazy dog.

Then your program must print on console,

Valid Characters: Aquickbrownfoxjumpsoverthelazydog

Original Order: A, q, u, i, c, k, b, r, o, w, n, f, o, x, j, u, m, p, s, o, v, e, r, t, h, e, l, a, z, y, d, o, g,

Reverse Order: g, o, d, y, z, a, l, e, h, t, r, e, v, o, s, p, m, u, j, x, o, f, n, w, o, r, b, k, c, i, u, q, A,

However, in case, if input length is smaller than 1 or greater than 50 then following message should be displayed.

Invalid: input should contain 1 to 50 characters.

Note:

It is required to make sure that the program should consider both small and capital alphabets (i.e., a to z & A to Z) and numbers (i.e., 0 to 9) as valid characters. Spaces and punctuation marks (! . , ; : ? etc.) must be ignored. For example, the output of program for following string should be;

Input:

“Help!” she cried. “I can’t swim!”

Output:

Valid Characters: HelpshecriedIcantswim

Original Order: H, e, l, p, s, h, e, c, r, i, e, d, I, c, a, n, t, s, w, i, m,

Reverse Order: m, i, w, s, t, n, a, c, I, d, e, i, r, c, e, h, s, p, l, e, H,

Compiler:

For compilation purpose, you can consult any online compiler, like

Valid Characters:

TypeCharacters
Numbers0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Small Alphabetsa, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z
Capital AlphabetsA, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z

SNOBOL4 Built-in Functions:

FunctionDescription
SIZE(S)Return the number of characters in string S.
GT(X, Y)        Integer X is greater than integer Y.
GE(X, Y)Integer X is greater than or equal to integer Y.
LT(X, Y)        Integer X is less than integer Y.
LE(X, Y)        Integer X is less than or equal to integer Y.

Sample Output:

CS508 Assignment Solution # 2nd Fall 2021

*(BCXXXXXXXXX)
STRING = INPUT

MSG = STRING 
COUNT = SIZE(MSG)   
CHAR_ARRAY = DUPL('-',50 - SIZE(50))
VALID_ARRAY = ''
ORIGNAL_ORDER = ''
REVERSE_ORDER = ''  

 PATTERN = ('0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z') $ A
 HYPHEN = ('-') $ H

LT(COUNT,1) :S(E2) F(E1)

E1 GT(COUNT,50) :S(E2) F(P1)
E2 MSG = ‘Invalid characters’ :(S3)

P1 STRING PATTERN = :S(P2) F(P3)
P2 CHAR_ARRAY = CHAR_ARRAY ” A :(P1)

P3 CHAR_ARRAY HYPHEN = :S(P3)F(P4)
P4 CHAR_ARRAY PATTERN = :S(V1)F(P5)
V1 VALID_ARRAY = VALID_ARRAY ” A :(O1)
O1 ORIGNAL_ORDER = ORIGNAL_ORDER A ‘, ‘ :(R1)
R1 REVERSE_ORDER = REVERSE_ORDER ‘ ,’ A :(P4)

P5 REVERSE_ORDER = REVERSE(REVERSE_ORDER) :(M1)

M1 MSG = ‘Valid Characters : ‘ VALID_ARRAY ” :(S1)
S1 OUTPUT = MSG

MSG = 'Orignal Order : ' ORIGNAL_ORDER '' :(S2)

S2 OUTPUT = MSG

MSG = 'Reverse Order : ' REVERSE_ORDER '' :(S3)

S3 OUTPUT = MSG

END

For More Assignment Details

CS508 Assignment Solution # 2nd Fall 2021#CS508 Assignment Solution # 2nd Fall 2021#CS508 Assignment Solution # 2nd Fall 2021#CS508 Assignment Solution # 2nd Fall 2021

#CS508 Assignment Solution # 2nd Fall 2021#CS508 Assignment Solution # 2nd Fall 2021#CS508 Assignment Solution # 2nd Fall 2021#CS508 Assignment Solution # 2nd Fall 2021

CS601 Assignment Solution # 2nd Fall 2021

CS601 Assignment Solution # 2nd Fall 2021

CS601 Assignment Solution # 2nd Fall 2021

Instructions:

Please read the following instructions carefully before submitting assignment:

You need to use MS word document to prepare and submit the assignment on VU-LMS.

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

  • The assignment is submitted after due date.
  • The assignment is not in the required format (doc or docx)
  • The submitted assignment does not open or file is corrupt.
  • Assignment is copied (partial or full) from any source (websites, forums, students, etc)

Objectives:

The objectives of this assignment is to enhance the learning capabilities of students about:

  1. Encoding Scheme
  2. Nyquist sampling rate
  3. Bit rate

Question No. 1                                                                                                                                                                      

The Diagram given below is representing the Manchester encoding scheme. You are required to carefully analyze it and then write the binary pattern represented by the diagram:

Hint: First bit is 0 and its voltage level is positive to negative.

Give your answer in the following table:

Question No. 2

Suppose we have sampled a low-pass signal with a bandwidth of 350 KHz using 2048 levels of quantization.

a. Calculate the Nyquist sampling rate for this signal.

b. Calculate the bit rate of the digitized signal.

Note: You need to mention all the steps with proper calculation.

CS601 Assignment Solution # 2nd Fall 2021

Question No. 1                                                                                                                                                                      

The Diagram given below is representing the Manchester encoding scheme. You are required to carefully analyze it and then write the binary pattern represented by the diagram:

Give your answer in the following table:

Question No 1 Solution :

0010011101

Question No. 2

Suppose we have sampled a low-pass signal with a bandwidth of 350 KHz using 2048 levels of quantization.

a. Calculate the Nyquist sampling rate for this signal.

b. Calculate the bit rate of the digitized signal.

Question No. 2 Solution

Suppose we have sampled a low-pass signal with a bandwidth of 350 KHz using 2048 levels of quantization.

a. Calculate the Nyquist sampling rate for this signal.

In a low-pass signal, the minimum frequency is Zero, So.
Fmax = 0 + 350 = 350 KHz
Fs = 2 * 350000  1KHz = 1000
Fs  = 700000 Sample per seconds.

b. Calculate the bit rate of the digitized signal.

For More Assignment Details

CS601 Assignment Solution # 2nd Fall 2021#CS601 Assignment Solution # 2nd Fall 2021#CS601 Assignment Solution # 2nd Fall 2021#CS601 Assignment Solution # 2nd Fall 2021

CS201 Assignment Solution # 2nd Fall 2021

CS201 Assignment Solution # 2nd Fall 2021

CS201 Assignment Solution # 2nd Fall 2021

Instructions

Please read the following instructions carefully before submitting the assignment:

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

  • Assignment is submitted after due date.
  • Submitted assignment does not open or file is corrupt.
  • Assignment is copied (From internet/students).

The recommended tool to develop Assignment

Dev C++

Objectives:

To enable students to understand and practice the concepts of:

  • Data Types and Variables
  • If-else statements
  • Repetition structure
  • Loops and Operators
  • Arrays

Assignment Submission Instructions

You have to submit only.CPP file on the assignments interface of CS201 from your LMS account. Assignment submitted in any other format will be scaled with zero marks. So, check your solution file format before submission.

Assignment

In this assignment you will write a program which will display vowels (a,e,i,o,u) in your name and the total count of vowels in your name. After determining total number of vowels in your name you will add the total number of vowels and your student Id’s  last digit,

  1. Declare two char type arrays for student’s first name and student’s VU ID.
  2. Display Student name and ID as show in Figure 1.
  3. Display last digit of Student ID as show in Figure 1.
  4. Find and display vowels (a,e,i,o,u) in your first name.
  5. Find total number of vowels (a,e,i,o,u) in your first name.
  6. Display each deducted vowel as shown in as show in Figure 1.
  7. Calculate SumVD as::SumVD = total numbers of vowels  + last digit of your student ID.
  1. If value of sumVD is even, print your first name ‘n’ times. (Value of “n” is equal to SumVD)
  2. If value of sumVD is odd, print your last name ‘n’ times. (Value of “n” is equal to SumVD)

Note: Student’s first name, Student VUID and last digit of students VUID should be hardcoded in your program.

Sample screenshot:

CS201 Assignment Solution # 2nd Fall 2021

include

using namespace std;

int main()
{
char firstName[] = “Your First Name Here”;
char lastName[] = “Your Last Name Here”;
char VUID[] = “Your VUID Here”;
int lastDigit = 0; // last digit of vuid
int vowels = 0;

cout << "My First Name : " << firstName << endl;
cout << "My VU ID : " << VUID << endl;
cout << "Last Digit of my VU ID : " << lastDigit << endl
     << endl
     << endl;

for (int i = 0; firstName[i] != '\0'; ++i)
{
    if (firstName[i] == 'a' || firstName[i] == 'e' || firstName[i] == 'i' ||
        firstName[i] == 'o' || firstName[i] == 'u' || firstName[i] == 'A' ||
        firstName[i] == 'E' || firstName[i] == 'I' || firstName[i] == 'O' ||
        firstName[i] == 'U')
    {
        ++vowels;
        cout << "Vowel No " << vowels << " : " << firstName[i] << endl;
    }
}

int total = vowels + lastDigit;
cout << "\nTotal Vowels in my First Name : " << vowels << endl;
cout << "Sum of vowels in first name and last digit of VUID : " << total << endl
     << endl
     << endl;

if (total % 2 == 0)
{
    for (int i = 1; i <= total; i++)
    {
        cout << "Iteration no : " << i << endl;
        cout << "My First name is " << firstName << endl;
    }
}
else
{
    for (int i = 1; i <= total; i++)
    {
        cout << "Iteration no : " << i << endl;
        cout << "My last name is " << lastName << endl;
    }
}

return 0;

}

For More Assignment Details

CS201 Assignment Solution # 2nd Fall 2021#CS201 Assignment Solution # 2nd Fall 2021#CS201 Assignment Solution # 2nd Fall 2021

CS411 Assignment Solution # 2nd Fall 2021

CS411 Assignment Solution # 2nd Fall 2021

CS411 Assignment Solution # 2nd Fall 2021

Please carefully read the following instructions before attempting the assignment.

RULES FOR MARKING

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

  • The assignment is submitted after the due date.
  • The submitted assignment does not open or file is corrupt.
  • Strict action will be taken if submitted solution is copied from any other student or from the internet.

Lectures:

  • Lectures 7 to 14

Problem Statement:

You are required to create a C# Console application using Visual Studio to calculate area of rectangle with the following functional requirements:

Create an interface and name it “Shape”. And it will contain declaration of two methods.

  1. getInput      2)  area

Create a single class

1. Rectangle               

Rectangle class will have a function getInput() to take input values from user and area() to calculate the area of respective category.

Your Program should have the following functionalities:

  • First you have to take your VUID as a input.
  • In the Rectangle class create a function getInput() in which you will take an input from the user for the attribute length and width. You have to take first digit of your VUID as length of rectangle and last two digit of VUID as a width. For example, if your ID is BS123456789 so your length value should be 1 and width value should be 89. Now create a function area() to calculate the area of rectangle.
  • (Note: You should also have to check if the first and last two numeric character of your vu id is zero then your code should increment it with 1 so in any case your code should not return zero answer. This check is compulsory for every student, whether your vuid has 0 as the starting or ending digit or not)

After taking all values from user when you press enter a window form will appear as shown in below figure.

When you click on calculate button, a built-in delegate function should invoke and a dialog box that will display Area of rectangle appear on screen.

Remember that you don’t need to create custom delegate for this purpose, just use built-in delegate code in your application.

CS411 Second assignment fall 2021

CS411 second assignment fall 2021

Kindly change the file extension to .cs from .txt and make some changes.
If you want to run the file, You will need Visual Studio with added references of Windows form and Drawing

For More Assignment Details

CS411 Assignment Solution # 2nd Fall 2021#CS411 Assignment Solution # 2nd Fall 2021#CS411 Assignment Solution # 2nd Fall 2021

MGT201 GDB Solution # 1 Fall 2021

MGT201 GDB Solution # 1 Fall 2021

MGT201 GDB Solution # 1 Fall 2021

GDB No.  1
Semester: Fall 2021

Question Description

Financial Analysis

Financial analysis is among the key functions of financial management, it helps in deciding about the performance of the companies based on comparisons. Among various ratio analyses, liquidity analysis allows companies to analyze their ability to manage short term obligations.

This analysis is significant if it is a relative analysis in which comparison is made with some benchmarks. Such comparisons help companies to improve their position and to take right decision about management of various components of working capital that can ultimately improve their liquidity position.

Required:

Following information has been extracted from the financial statements of ABC Company to analyze liquidity position of the Company based on current ratio.

1. If an industry bench mark of current ratio is 2:1, calculate current ratio of ABC Company from the following data and compare it with industry bench mark.

2. Calculate current ratio if company has decided to use Rs. 200,000 to pay off short term debt. Discuss whether company’s decision to pay off sort term debt with cash is right to improve the liquidity position? Why or why not?

Important Instructions:

  • Post your GDB comments (answer) against GDB # 01 rather than against lessons’ MDB.
  • Your discussion must be based on logical facts.
  • Do not copy or exchange your answer with other students.  Two identical / copied comments will be marked Zero (0) and may damage your grade in the course.
  • Books, websites and other reading material may be consulted before posting your comments; but copying or reproducing the text from books, websites and other reading materials is strictly prohibited. Such comments will be marked as Zero (0) even if you provide references.
  • Obnoxious or ignoble answer should be strictly avoided.
  • Questions / queries related to the content of the GDB, which may be posted by the students on MDB or via e-mail, will not be replied till the due date of GDB.

MGT201 GDB Solution # 1 Fall 2021

Solution:

MGT201 GDB Solution # 1 Fall 2021

1. 

Benchmark of the company is 2/1

We should calculate the current ratio which is equal to = current assets / current liabilities

 Where

Current Assets = Cash+ Inventory+ Accrued Receivables + Marketable Securities

= 400,000 + 150,000 + 100,000 + 200,000

= 850,000

Current Liabilities = Account Payables + Short term debts + Accruals

= 100,000 + 150,000 + 250,000

= 500,000

Current Ratio = 850,000/500,000

Current Ratio = 1.7/1

It is lower than the benchmark

2. 

If a company wants to pay off its short-term MGT201 GDB Solution # 1 Fall 2021 debts of Rs 20,000 we will deduct the value of Rs 200,000 from cash in Current assets and from short-term debts in current liabilities.

 Current Assets = 850,000 + 200,000

= 650,000

Current Liabilities = 500,000 + 200,000

= 300,000

Now again calculate the value of Current Ratio

= 650,00/300,000

= 2.1/1

This is higher than the benchmark so the company should pay off its short-term debts.

Download File

For More GDB Details

 

MTH101 Assignment Solution # 1 Fall 2021

MTH101 Assignment Solution # 1 Fall 2021

MTH101 Assignment Solution # 1 Fall 2021

Assignment No.  1
Semester: Fall 2021

Question:

Consider the equation of a circle x2-2x+y2-4y-4=0. If the line 

2x- y+a=0 is its diameter. Then find the value of a.

Solution :

x²-2x+y²-4y-4=0 …… (1) 

General Form is 

x²+y²+2gx+2fy+c=0   ……. (2)

Comparing eq 1 and 2

2g=-2 g=-1

2f=-4

f=-2

We know that

Center (-g, -f)

 C (1, 2)

Diameter lines pass through the point of the circle of the center of 

circle, So the center point is satisfying the line.

2x-y+a=0 

2(1)-(2) +a=0

2-2+a=0

-2+a= -2

a = -2+2

a=0

For More Assignment Details

MGT101 Assignment Solution # 1 Fall 2021

MGT101 Assignment Solution # 1 Fall 2021

MGT101 Assignment Solution # 1 Fall 2021

Assignment No.  1
Semester: Fall 2021

Question #1:

Write  the  relevant  source  of  financial  information  in the second  column  against  all information  given  in the first column  from  the  following  list:

  1. Event

2. Transaction

3. Condition

First Column InformationSecond Column Source of information
  Payment  of  salaries  to employees  ?
  Loss by fire  ?
  Depreciation of non-current assets  ?
  Sale of goods to ABC Brothers  on  credit  basis  ?

Question # 1 Solution:

  Payment  of  salaries  to  employees  Transaction
  Loss by fire  Event
  Depreciation of non-current assets  Condition
  Sale of goods to ABC Brothers on credit basis  Transaction

MGT101 Assignment Solution # 1 Fall 2021

Question # 2 :

  Date  Transactions
  7th November  Goods purchased amounting to Rs. 30,000 on the account.
  9th November  Goods purchased amounting to Rs. 15,000 on a Cash basis.
  15th November  Rs.  10,000  paid to creditors.
24th November  Sold goods to a customer for Rs. 20,000 on a credit basis
26th November  Sold goods to a customer for Rs. 27,000  on a cash basis
  28th November  Cash collected from customer  Rs.  5,000.
Required:

Based on the above transactions, calculate the amount/balance of the following accounts at the end of November 2021.
Debtors

Creditors

Debtors:

Opening  balance  =  35,000

(Add)  Credit  Sales  =  20,000

(Subtract  )  Cash  Collected  =  5,000

Closing  Balance  =  50,000

Creditors:

Opening  balance  =    45,000

(Add)  Credit  Purchases  =  30,000

(Subtract) Cash paid = 15,000

Closing  balance  =  60,000

MGT101 Assignment Solution # 1 Fall 2021

For More Assignment Details

CS304 Assignment Solution # 1 Fall 2021

CS304 Assignment Solution # 1 Fall 2021

CS304 Assignment Solution # 1 Fall 2021

Assignment No.  1
Semester: Fall 2021

Problem Statement:

Due to the increasing number of complaints regarding meat quality, Govt.   Of   Pakistan   has   decided   to   launch   an   “online   meat   Store” named  “Meat  On  Wheels”  so  that,  people  can

purchase red and white meat from home.  Through  this  way,  Govt.  of Pakistan  not  only  can  ensure  the  quality  of  meat  but  also  people

can be satisfied with the fact that the meat they are purchasing is healthy and  Halal.

The  “Meat  On  Wheels”  store will offer both  (red and white)  types of meat with all different categories or portions.  The user will be shown a  list of  Meat  Products,  which can be selected or deselected from the provided list.  The user will need to get registered to buy  Meat  Products.  At the end of shopping,  the customer can double-check all the  Products added into his Cart and verify the total amount before payment.  The  Store  Administrator will manage   Meat categories and   Products and assign orders to   Delivery Boys.

Draw an  Object  Model  (Class  Diagram)  for the given scenario showing main objects,  their attributes,  functions, and relationships.

CS304 Assignment Solution # 1 Fall 2021

Step by Step Guidance:

Extract the main objects  (entities)  of the above system.

Find the necessary attributes and functions that need to be associated with each object.

Identify the relationships among identified objects.

Submission:    

  Construct a    final comprehensive    Class diagram showing all objects and their relationships along with their attributes and functions.

Important things to consider:

As happens in real-world that everyone visualizes a  problem in a  different way so the solutions of all students may vary based upon their own thinking.

You have to use standard     UML notations for objects,       classes,       and their associations.

Hint:

Besides problem statements;  objects,  properties,  and functions of a  system can also be extracted from domain knowledge.

Note:

You have to use all concepts studied so far like abstraction,  encapsulation, inheritance,    association,    generalization,    and specialization wherever applicable.

Solution:

CS304 Assignment Solution # 1 Fall 2021

For More Assignment Details

CS601 Assignment Solution # 1 Fall 2021

CS601 Assignment Solution # 1 Fall 2021

CS601 Assignment Solution # 1 Fall 2021

Assignment No.  1
Semester: Fall 2021

Instructions:

Please read the following instructions carefully before submitting the assignment:

You need to use MS word documents to prepare and submit the assignment on VU-LMS.

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

  • The assignment is submitted after due date.
  • The assignment is not in the required format (doc or docx).
  • The submitted assignment does not open or file is corrupt.
  • Assignment is copied (partial or full) from any source (websites, forums, students, etc).

Objectives:

To enhance the learning capabilities of the students about:

  • Transmission Modes
  • TCP/IP Layers
  • Network Topologies
  • Types of Computer Networks

Question No. 1   

“Global Consultants” is a consultancy company in Lahore. A couple of days ago, they have decided to open another office in Islamabad. In the new office, they want to establish a computer network for different departments. Following are the department details:

  1. In the “Marketing department” there will be 9 computers that are interconnected with each other to provide efficient communication among them.
  2. In the “Admin department” there will be 5 computers that are connected via a central hub.

At the end of the day, the admin department of the Islamabad office will pass all the data to a secure main server in Lahore.

After carefully reading the above scenario, write down the answer to each of the questions given in the following table:

Questions:Answer:
Identify the topology that will be used in the “Admin Department”. 
Identify the topology that will be used in the “Marketing department” department. 
Number of links that will be required for the identified topology of “Marketing department”? 
Which type of computer network (LAN or WAN) will be designed within the “Admin department”? 
Number of links that will be required for the identified topology of “Admin Department”? 
Which TCP/IP layer will be responsible for passing the data to the main server in Lahore? 

Question No. 2   

The following table contains some communication scenarios. You are required to mention the suitable Transmission mode against each scenario.

Communication ScenariosTransmission Mode
Fire Alarm system. 
Two traffic wardens talking to each other via walkie-talkie. 
Two friends talking on cellular phone 
Output on the LED monitor 

CS601 Assignment Solution # 1 Fall 2021

Question No 1 Solution :

Questions:Answer:
Identify the topology that will be used in the “Admin Department”.Star topology
Identify the topology that will be used in the “Marketing department” department.Mesh topology
Number of links that will be required for the identified topology of “Marketing department”?9(9-1)/2=36 N(N-1)/2
Which type of computer network (LAN or WAN) will be designed within the “Admin department”?For Local LAN transmit data to Lahore WAN
Number of links that will be required for the identified topology of “Admin Department”?N 5
Which TCP/IP layer will be responsible for passing the data to the main server in Lahore?Network Layer

Question No 2 Solution :

Communication ScenariosTransmission Mode
Fire Alarm system.simplex
Two traffic wardens talking to each other via walkie-talkie.Half-Duplex
Two friends talking on cellular phoneFull-Duplex
Output on the LED monitorSimple

CS601 Assignment Solution # 1 Fall 2021

For More Assignment Details

                                                                                                                        

                                                                                                                     

CS201 Assignment Solution # 1 Fall 2021

CS201 Assignment Solution # 1 Fall 2021

CS201 Assignment Solution # 1 Fall 2021

Assignment No.  1
Semester: Fall 2021

Due Date: 9 Dec 2021

Total Marks: 20

Code Solution:

include #include

using namespace std;

void printnameid(string studentid, string studentname); int calculatelastthreedigits(string studentid);

int main()
{

string studentid=”BC18020431″; // Student id

string studentname=”Muhammad Sarim”; // Student name

printnameid(studentid,studentname);
int TotalLastThreeDigits=calculatelastthreedigits(studentid); int counter=1;
int a,b,c;
// Students id last 3 digits a=4;
b=3; c=1;
cout<<“”<<endl;
cout<<“Sum of Last 3 digits is=”<<a+b+c<<endl; cout<<“”<<endl;
if ( TotalLastThreeDigits % 2 == 0) // Divide by 2 and see if the reminder is zero? then it is even otherwise it is odd number
{

cout<< ” Sum is an even value “<<endl; cout<<“”<<endl;

cout<<“++++++++++++++++++++++++++++++++++++++++++++
“<<endl;
cout<<“”<<endl;
while(counter <= TotalLastThreeDigits)
{

cout << ” Iteration: ” <<counter <<endl;
cout << “My student id is:” <<studentid<<endl; counter++;
}
}

else
{

cout << ” Sum is an odd value:”<<endl; while(counter <= TotalLastThreeDigits)
{

cout<< ” Iteration: “<<counter<<endl;
cout<< “My name is “<<studentname<<endl; counter++;

}
}

return 0;
}

void printnameid(string studentid, string studentname){ cout<<” My name “<<studentname <<endl;
cout<<” My student id is “<<studentid<<endl;

}

int calculatelastthreedigits(string studentid) {

int end=studentid.length(); // Ending point that is total length of string
int start=end-3; // Starting point
string lastthreedigits=studentid.substr(start,end); // Trim the last three digits;
int total=0;

//Calculate the sum of last three digits
for ( int index=0; index < lastthreedigits.length(); index++) { total += lastthreedigits[index] – ‘0’;
}
return total;
}

Code Solution Output :

CS201 Assignment Solution # 1 Fall 2021

CS201 Assignment Solution # 1 Fall 2021

For More Assignment Details

Exit mobile version