Visual Programing (CS411)
Assignment#01_Spring2019 (GRADED)
Total marks = 20
Deadline Date = 16th May 2019
Please carefully read the following instructions before attempting the assignment.
You are required to create a C# Console application using Visual Studio.
Problem Statement:
Output.gif has been attached with this Assignment file please observe this file carefully your program’s output must be like this output file.
Submission details Following Files Must be submitted in a single zip or rar file. · .C# code file · A .gif file which shows working of your Application(For Recording .gif a software named Screentogif is uploaded on LMS, or you can use any other gif recording tool as well) You are not required to submit the complete project, only copy these files from project folder. Make sure to write your own VU ID in the assignment file(s) otherwise assignment will not be accepted. |
If you do not submit any of the above mentioned file you will be awarded 0 Marks.
For any query please contact: CS411@vu.edu.pk
Tags:
ma ny code liga ha xml file be ban gai ha lekain ye ju command prompt pa ju name,id aor degree enter karni hoti ye ni hori ye kaisy open hu ki. ahsi file ni open hu rahi ye kaisy open hu gi
Solution:
using System;
using System.Text;
using System.Xml;
namespace Asignment1
{
public class Person
{
private string name;
public void setname(String sname)
{
this.name = sname;
}
public string getname()
{
return this.name;
}
}
public class Student : Person
{
private String VUID;
private string program;
public void setid(string sID)
{
this.VUID = sID;
}
public void setprogram(string sprog)
{
this.program = sprog;
}
public string getid()
{
return this.VUID;
}
public string getprogram()
{
return this.program;
}
}
class Program
{
static void Main(string[] args)
{
XmlWriter xmlWriter = XmlWriter.Create("students.xml");
Student s = new Student();
Console.Write("Enter Your Name:");
string name = Console.ReadLine();
Console.Write("Enter Your Student ID:");
string sid = Console.ReadLine();
Console.Write("Enter Your Degree Program:");
string prog = Console.ReadLine();
s.setname(name);
s.setid(sid);
xmlWriter.WriteStartDocument();
xmlWriter.WriteStartElement("Students");
xmlWriter.WriteStartElement("name");
xmlWriter.WriteString(s.getname());
xmlWriter.WriteEndElement();
xmlWriter.WriteStartElement("VUID");
xmlWriter.WriteString(s.getid());
xmlWriter.WriteEndElement();
xmlWriter.WriteStartElement("program");
xmlWriter.WriteString(s.getprogram());
xmlWriter.WriteString(s.getprogram());
xmlWriter.WriteEndElement();
xmlWriter.WriteEndDocument();
xmlWriter.Close();
Console.WriteLine("File Written Successfully!");
Console.ReadKey();
}
}
}
plz sir assignment bnany ka terika bta dain
plzz upload solution file
CS411 Assignment No 01 Solution Spring 2019
CS411-Assignment-1-Solution-Spring-2019
aoa bhai .gft file bana dain na kindly
brother yeh sara code kahan paste kerna hhai
student ki class main k person ki
i have no idea
ye total code hy bro. just paste in program.cs window.. but there is some issue that it is not writing degree program
Sir! is me program print nhi ho rha
https://drive.google.com/file/d/1LmjoYq2oEKwcrNVtE7ZirqRoUTqv0PXe/view
© 2021 Created by + M.Tariq Malik.
Powered by
Promote Us | Report an Issue | Privacy Policy | Terms of Service
We are user-generated contents site. All product, videos, pictures & others contents on site don't seem to be beneath our Copyrights & belong to their respected owners & freely available on public domains. We believe in Our Policy & do according to them. If Any content is offensive in your Copyrights then please email at m.tariqmalik@gmail.com with copyright detail & We will happy to remove it immediately.
Management: Admins ::: Moderators
Awards Badges List | Moderators Group
All Members | Featured Members | Top Reputation Members | Angels Members | Intellectual Members | Criteria for Selection
Become a Team Member | Safety Guidelines for New | Site FAQ & Rules | Safety Matters | Online Safety | Rules For Blog Post