Skip to content
  • 0 Votes
    5 Posts
    1k Views
    zaasmiZ
    Assignment No. 01 Semester: Spring 2020 CS432 –Network modeling and simulation Total Marks: 20 Due Date: 21/05/2020 Assignment Objectives: • To enhance the knowledge of use cases as part of simulation building process • To improve the learning of creation of the project in Omnet ++ simulation tool. Uploading instructions: • Your assignment must be in .doc format (Any other formats like scan images, PDF, bmp, etc will not be accepted). • 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 submitted assignment does not open or file is corrupted. • Your assignment is copied from internet, handouts or from any other student (Strict disciplinary action will be taken in this case). Assignment Question No. 1 [Marks: 10] You are required to install OMNET++ in your system and write down all installation steps. When installation is completed, do the following tasks: • Open OMNET++ IDE. • Create a new empty project. • Give your VUID as project name. • After creation of project takes a snapshot of the newly created project, in which your VUID is shown as project name. Sample of snapshot is given as under. [image: aZawHZe.png] Note: Installation guide is available in download section on VULMS. Question No. 2 [Marks: 10] Following is a XYZ University Registration System’s use case. You are required to identify and define the Simulation Building Process activities (Entities, states, Events) of given use case. [image: NlBECcZ.png] Deadline: Your assignment must be uploaded/submitted on or before 21st May 2020.
  • 0 Votes
    2 Posts
    741 Views
    zareenZ
    Solution Ideas: Write XML Schema (.xsd) code for the given XML Answer XSD Code <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="BookStore"> <xs:complexType> <xs:sequence> <xs:element name="Book" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="Title" type="xs:string"/> <xs:element name="Course" type="xs:string"/> <xs:element name="Year" type="xs:unsignedShort"/> <xs:element name="Publisher" type="xs:string"/> <xs:element name="Author" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> Generate the following XML on a server as output using PHP Answer PHP CODE <?php header("Content-type: text/xml"); echo"<BookStore>"; echo"<Book>"; echo"<Title>Introduction to Computing</Title>"; echo"<Course>CS101</Course>"; echo"<Year>2016</Year>"; echo"<Publisher>Virtual University of Pakistan </Publisher>"; echo"<Author>Dr Tanveer Ahmad</Author>"; echo"</Book>"; echo"<Book>"; echo"<Title>Object Oriented Programming</Title>"; echo"<Course>CS304</Course>"; echo"<Year>2017</Year>"; echo"<Publisher>Virtual University of Pakistan</Publisher>"; echo"<Author>Dr Shafeeq</Author>"; echo"</Book>"; echo"</BookStore>"; ?> PHP OUTPUT
  • 0 Votes
    3 Posts
    870 Views
    zareenZ
    @zareen said in CS001 Assignment 2 Solution and Discussion: Question No 01 7 marks Suppose you are running an online bookstore; 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 and time at the specified location. • Insert a hyperlink on “Fast Courier ®” of address www.fastcourier.com.pk • Insert a table stating customer’s complete order details. How to Insert today’s date and Time On the Insert tab, in the Text group, click Date & Time. In the Date and time dialog box, select the format you want and click OK. The date is inserted as text. Insert Hyperlink in MS Word Select the text or picture that you want to display as a hyperlink. On the Insert tab, click Hyperlink. You can also right-click the text or picture and click Hyperlink on the shortcut menu. In the Insert Hyperlink box, type or paste your link in the Address box. [image: VyutbSP.png]
  • 0 Votes
    1 Posts
    569 Views
    No one has replied
  • 0 Votes
    2 Posts
    649 Views
    zareenZ
    Solution: a) Court Beat. b) Trade and Commerce/Business. c) General Beat. d) Sports Beat. e) Entertainment Beat. Sources were required as mentioned at the link:
  • 0 Votes
    1 Posts
    355 Views
    No one has replied
  • 0 Votes
    1 Posts
    422 Views
    No one has replied
  • 0 Votes
    1 Posts
    464 Views
    No one has replied
  • 0 Votes
    2 Posts
    744 Views
    zareenZ
    Q. 1 Solution: [image: qAdyvAZ.png] Q. 2 Solution: [image: EwHyW8P.png]
  • 0 Votes
    3 Posts
    791 Views
    zareenZ
    @zareen said in EDU304 Assignment 1 Solution and Discussion: Explain types of guidance and counseling also describe why the need of Guidance and Counseling arise in academic setting? (4+4+4= 12 Marks) Idea Solutionz
  • 0 Votes
    1 Posts
    652 Views
    No one has replied
  • 0 Votes
    2 Posts
    1k Views
    zareenZ
    Ideas Solution Q No 01 Solution: NP -> Adj NP The draw parse trees for above given grammar: [image: cR7P0Ng.png] The above given grammar have only one parse tree so it is non-ambiguous grammar. NP -> NP Conj NP The draw parse trees for above given grammar: [image: wflQD6P.png] The above grammar has two different parse trees therefore the given grammar is ambiguous. NP -> Adj N The draw parse trees for above given grammar: [image: IueNDrQ.png] The above given grammar have only one parse tree so it is non-ambiguous grammar. NP ->N The draw parse trees for above given grammar: [image: zjft37X.png] The above given grammar have only one parse tree so it is non-ambiguous grammar. Adj -> Young The draw parse trees for above given grammar: [image: zylKfdU.png] The above given grammar have only one parse tree so it is non-ambiguous grammar. Conj -> and The draw parse trees for above given grammar: [image: 4UWakYM.png] The above given grammar have only one parse tree so it is non-ambiguous grammar. N -> Boys | Girls The draw parse trees for above given grammar: [image: m7DKSyn.png] The above given grammar have only one parse tree so it is non-ambiguous grammar. Q No 02 Solution: The given grammar is S -> S + S | S / S | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 The draw parse trees for above given grammar: Parse Trees: [image: hamteDh.png] The above grammar has two different parse trees therefore the given grammar is ambiguous. THE END!
  • 0 Votes
    3 Posts
    2k Views
    zareenZ
    @zareen said in CS606 Assignment 1 Solution and Discussion: Use Subset Construction algorithm to find DFA for the NFA constructed in Task 1. The resulting DFA is [image: 3WrueIX.png]
  • 0 Votes
    1 Posts
    797 Views
    No one has replied
  • 0 Votes
    3 Posts
    984 Views
    zareenZ
    Answer 1 (a) Uplink Frequency Band=890 − 915MHz Downlink Frequency Band = 935 − 960 MHz Frequency Width for any band =Upper Frequency Limit − Lower Frequency Limit =915−890MHz =25MHz Width of a frequency channel=200KHz Maximum Available Channels = Band Width / Channel Width [image: Ni9sgA9.png] However, actually 124 channels are used if you consider the guard bands used between adjacent channels to avoid any inteference Answer – 1 (b) Channel Number (C ) = 50 Uplink carrier frequency for channel 50 = F uplink (50) Fuplink (50) =Baseuplink frequency + ChannelWidthz * Channel Number =890MHz+(200KHzx50) =890MHz+(0.2x50MHz ) =890+10MHz = 900 MHz Fdownlink (50)=Downlinkcarrier frequency forchannel50+DuplexSpacing =900MHz+45MHz = 945 MHz Alternate Method for calculating Downlink carrier frequency for channel 50 Downlink carrier frequency for channel 50 = Fdownlink (50) Answer 2 (a) Fdownlink (50) =Basedownlink frequency+ChannelWidthChannel Number =935+(200KHz50) = 935MHz+(0.250MHz ) = 935+10MHz = 945 MHz Ali is able to receive signals from Zain Network due to Roaming Service. Mobilink does not have coverage in Makkah so in order to provide coverage to its subscribers, Mobilink has an agreement with Zain Network. As per this agreement, Zain Telecom provides all the available services to the roaming customer of Mobilink. Answer 2(b) Following network components will be used in this case • Mobilink’s HLR • Zain’s MSC and VLR • Mobilink’s Authentication Center (AuC) Answer 2© When Ali makes a call from his phone, the request will first go to Zain Telecom’s BS (Base station) which will direct the request to MSC the Switching Center. MSC has a dedicated VLR (Visitor Location Register) installed which is dedicated for the visitor users. Since, Ali is a visitor, MSC will request VLR to fetch the Ali’s subscription details. If Ali’s subscription is already available, the VLR will authenticate Ali and allow the MSC to proceed with the call. Otherwise, VLR will look up the subscriber information from HLR. HLR before sending the subscriber details, asks AuC (Authentication Center) to authenticate the subscriber. If subscriber is valid and not blocked, then HLR provides the subscriber details to VLR.****
  • 0 Votes
    3 Posts
    1k Views
    zareenZ
    Idea Solution <?php if(!isset($_GET['customer_id']) || !isset($_GET['units'])){ $customer_id = 0; $units = 0; } else{ $customer_id = $_GET['customer_id']; $units = $_GET['units']; } $amount = 0; if($units > 0 && $units <= 50) { $amount = $units * 0.50; } else if($units <= 150) { $amount = 50 * 0.5 + (($units - 50) * 0.75); } else if($units <= 250) { $amount = 50 * 0.5 + 100 * 0.75 + (($units - 150) * 1.00); } else { $amount = 50 * 0.5 + 100 * 0.75 + 100 * 1.0 + (($units - 250) * 1.50); } $tax = $amount * 0.18; $payable = $amount + $tax; $lp_surcharge = $payable * 0.05; $late_payable = $payable + $lp_surcharge; ?> <html> <head> <title>Assignment No. 2 (Solution) - Fall 2019</title> </head> <body bgcolor="#CCCCCC"> <table width="1800" border="0" align="center" cellpadding="20" cellspacing="0"> <tr> <td height="200" colspan="2" align="center" valign="middle" bgcolor="#CC6633"><h1>Natural Gas Company Pakistan</h1></td> </tr> <tr> <td width="300" align="center" valign="top" bgcolor="#FF9966"><table width="100%" border="0" cellspacing="0" cellpadding="20"> <tr> <td align="right"><strong>Customer ID</strong></td> </tr> <tr> <td align="right"><strong>Units Consumed</strong></td> </tr> <tr> <td align="right"><strong>Cost of Gas</strong></td> </tr> <tr> <td align="right"><p><strong>Taxes (18%)</strong></p></td> </tr> <tr> <td align="right"><strong>Payable within Due Date</strong></td> </tr> <tr> <td align="right"><strong>Late Payment Surcharge (5%)</strong></td> </tr> <tr> <td align="right"><strong>Payable after Due Date</strong></td> </tr> </table> </td> <td height="500" align="left" valign="top" bgcolor="#FFDECE"><table width="100%" border="0" cellspacing="0" cellpadding="20"> <tr> <td><strong><?php echo $customer_id; ?></strong> </td> </tr> <tr> <td><?php echo $units; ?></td> </tr> <tr> <td><?php echo $amount; ?></td> </tr> <tr> <td><?php echo intval($tax*100) / 100; ?></td> </tr> <tr> <td><?php echo intval($payable * 100) / 100; ?></td> </tr> <tr> <td><strong><?php echo intval($lp_surcharge * 100) / 100; ?></strong></td> </tr> <tr> <td><strong><?php echo intval($late_payable * 100) / 100; ?></strong></td> </tr> </table></td> </tr> <tr> <td height="140" colspan="2" align="center" valign="middle" bgcolor="#CC6633"><h4>Copy Rights: NGCP</h4></td> </tr> </table> </body> </html> Ideas 2 <?php if (isset($_POST[‘submit’])) { $salary = $_POST[‘salary’]; if ($salary>50000) { $insurance = (20/100)*$salary; echo “Your salary is “.$salary . ” And Calculated insurance is “. $insurance; }elseif($salary>40000){ $insurance = (15/100)*$salary; echo “Your salary is “.$salary . ” And Calculated insurance is “. $insurance; }elseif($salary>30000){ $insurance = (10/100)*$salary; echo “Your salary is “.$salary . ” And Calculated insurance is “. $insurance;
Reputation Earning
How to Build a $1,000/Month World CUP LIVE Matches Live Cricket Streaming
Ads
File Sharing
Stats

0

Online

3.0k

Users

2.8k

Topics

8.5k

Posts
Popular Tags
Online User
| |