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.

Visual Programming (CS411) Assignment # 2 (GRADED) ......... Deadline Date = 10/12/2015

Visual Programming (CS411)

Assignment # 2 (GRADED)

Total marks = 20

                                                                                       Deadline Date = 10/12/2015

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 due date.
  • The submitted assignment does not open or file is corrupt.
  • The assignment is copied. Note that strict action would be taken if the submitted assignment is copied from any other student. Both students will be punished severely.

 

1)      You should consult recommended books to clarify your concepts as handouts are not sufficient.

2)      You are supposed to submit your complete solution project as a single file (i. e. zip or RAR). Any other formats like scan images, PDF, bmp, docx etc. will not be accepted.

3)      You are advised to upload your assignment at least two days before Due date.

 

Important Note:

Assignment comprises of 20 Marks. Note that no assignment will be accepted after due date via email in any case (whether it is the case of load shedding or emergency electric failure or internet malfunctioning etc.). Hence, refrain from uploading assignment in the last hour of the deadline, and try to upload Solutions at least 02 days before the deadline to avoid inconvenience later on.

For any query please contact: CS411@vu.edu.pk

Question:

You are required to implement a Simple Salary Reader System (SSRS). The name and salary of different people is given in the attached XML file. Write a console based application with following requirements:

Program will take name of a person as input. It will then read the XML file to search the said person. If person is found, its salary will be read from the file and displayed on console as shown in output window given below. However, if person is not found, system will display “Person not found” message.

To Read XMLSalaries file from the project folder, you can use following statement:

string Dir = System.IO.Path.GetFullPath(@"..\..\..\");

The above statement will return the path of your project folder (the folder containing XMLSalaries.xml file). So, in above case “Dir” variable will contain “E:\\SalaryReader\\”. Now you can append name of the file (i.e. XMLSalaries.xml) with “Dir” variable and read it.

+ 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: 6126

.

+ 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

bhi code bi send kar do plz

yr ni maan raaa

stil  giving 4 errorsss

CS411 Assignment solution 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
namespace SalaryReader
{
class Program
{
static void Main(string[] args)
{
String XMLDataFilePath= "C:\\SalaryReader\\SalaryReader\\XMLSalaries.xml";
String EmployeeName = "";
int varNoRecord = 0;
XmlReader Reader = XmlReader.Create(XMLDataFilePath);
Console.Write("Enter the Name of Person: ");
EmployeeName=Console.ReadLine();
while (Reader.Read()==true)
{
if ((Reader.NodeType == XmlNodeType.Element))
{
if (Reader.HasAttributes & Reader.GetAttribute("Name")==EmployeeName)
{
Console.WriteLine("Salary Of " + Reader.GetAttribute("Name") + " = " + Reader.GetAttribute("CurrentSalary"));
varNoRecord = 1;
}
}
}
if (varNoRecord == 0)
Console.WriteLine("Oop! No Person with the name "+EmployeeName+" was found");
Console.WriteLine("Press any key to continue...");
Console.ReadKey(); 
}
}
}

Thanks Malik, It's Working...

ye kia ghalti ha

Attachments:

RSS

Latest Activity

Maham tariq replied to Usman Mughal's discussion cs401 assignment no.3 solution in the group CS401 Computer Architecture and Assembly Language Programming
2 minutes ago
Maham tariq replied to Usman Mughal's discussion cs401 assignment no.3 solution in the group CS401 Computer Architecture and Assembly Language Programming
2 minutes ago
Profile IconMaham tariq and Amylah joined +M.Tariq Malik's group
2 minutes ago
Misbii Khan liked Mani Siddiqui BS VIII's discussion Heavy Raining in Karachi
5 minutes ago
Misbii Khan liked +ıllıllı ᎶᏋᏁᎥᏬᏕ ᏰᎥᏒᎴ ıllıllı+'s discussion *****wish u a very HAPPY BIRTHDAY!! with great joy !!!!!JK!!! (kaalii)
27 minutes ago
Misbii Khan liked + عاتکہ's discussion ****Lets Celebrate The Birthday Of Our belOved MoD. (JK) @ Kaliii*****
27 minutes ago
Misbii Khan liked + عاتکہ's discussion ****Lets Celebrate The Birthday Of Our belOved MoD. (JK) @ Kaliii*****
27 minutes ago
BBA(4th smes) posted a discussion
32 minutes ago
Mani Siddiqui BS VIII posted a status
1 hour ago
Misbii Khan updated their profile
4 hours ago
+ ! Cʜocoɭʌtƴ Ɓoƴ replied to + عاتکہ's discussion ****Lets Celebrate The Birthday Of Our belOved MoD. (JK) @ Kaliii*****
6 hours ago
+ ! Cʜocoɭʌtƴ Ɓoƴ liked + عاتکہ's discussion ****Lets Celebrate The Birthday Of Our belOved MoD. (JK) @ Kaliii*****
6 hours ago

Today Top Members 

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

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

.