We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Visual Programing (CS411)

Assignment#01 (GRADED)

  Total marks = 20

                                                                                       Deadline Date = 09-05-2018

Please read all the instructions carefully before attempting the assignment.

You are required to create a C# application Console using Visual Studio.

Problem Statement:

You are required to create a C# Console application which will read a Text File and print it on Console screen:

  1. First the program will ask user for the file path.
  2. Next user is asked for reading the file line by line or ASCII codes of each character.
  3. After displaying the output the user will be asked if he wants to read another file or not.
  4. Same process will be done from step no 1 until user choses to exit.

 

Note. Proper Exception handling must be done while opening and reading the files.

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 three files from project folder. Please note if you submit doc file you will be awarded 0 marks.


+ 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)


Views: 4449

Attachments:

Replies to This Discussion

using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Spring_2018_CS411_1
{
class Program
{
static void Main(string[] args)
{
String path=null;
String op=null;
String again=null;
do
{
//Clear COnsole
Console.Clear();
Console.WriteLine("\t\tSpring_CS411_1");
//Ask User to Enter Path
Console.WriteLine("Please Enter file path.");
path = Console.ReadLine();
//Ask user to Read line by line or in ASCII code
Console.WriteLine("Press L to Read line by line and Press H to read Hascode");
op=Console.ReadLine();
//Read Line by Line
if(op == "L" || op == "l")
{
//Read in lines from file.
foreach (string line in File.Readlines(path))
{
//Print on Console after reading from File
Console.WriteLine("{0}");
}
}
//Read in ASCII code
else if (op == "H"|| op == "h")
{
//Read Text from File
String readText = File.readAllText(path);
//Convert Text to ASCII code
byte[] ASCIIValues = Encoding.ASCII.GetBytes(readText);
//Print ASCII code on Console
foreach (byte b in ASCIIValues)
{
//Print ASCII code on Console
Console.ReadLine(b);
}
}
//Ask User to read again or Exit
Console.WriteLine("Press R to read other file and any other key to Exit");
again = Console.ReadLine();
} while (again == "R" || again == "r");
}
}
}

it gives following three errors

(31:50) 'System.IO.File' does not contain a definition for 'Readlines'
(41:44) 'System.IO.File' does not contain a definition for 'readAllText'
(48:25) No overload for method 'ReadLine' takes 1 arguments

i'm also facing these 3 errors .. kindly help about it 

'File' does not contain contain a definition for 'ReadLines'.

'File' does not contain contain a definition for 'ReadAllText'

No overload for method 'ReadLine' takes 1 arguments

(31:50) 'System.IO.File' does not contain a definition for 'Readlines'
Solution : replace readlines with ReadLines.

(41:44) 'System.IO.File' does not contain a definition for 'readAllText'
Solution : replace readAllText with ReadAllText

(48:25) No overload for method 'ReadLine' takes 1 arguments
Solution : replace ReadLine with WriteLine.

what to use for  userkey to read it as string not int ??

Dear AEO+Programmer Bro i am getting this output.No text is being showing only 0 is showing when reading Line by line.

hamara b toh run krwa do bro kaise ho ga errors kaise khtm kron

Assalm-o- Alikum Sir,  

kaisey allocate kartey hain address?  mujey samj nai a rahi kindly ap mujey mail address dey dein mien apko screenshoot send karta hoon ya  ap pls mujey run karwa dein programe mien apko source code send kar deta hoon,   pls its my humble request!

i'm also facing these 3 errors .. kindly help about it 

'File' does not contain contain a definition for 'ReadLines'.

'File' does not contain contain a definition for 'ReadAllText'

No overload for method 'ReadLine' takes 1 arguments

how to install visual studio iso file. If cant burn it on cd/dvd 

using winrar extract iso file.

Fatal Error: Public Main() method is required in a public class

ye error aa raha ha

bro

RSS

Latest Activity

Mifa Fadel liked +M.Tariq Malik's discussion SOC101 Introduction to Sociology Assignment 01 Fall 2020 Solution / Discussion
1 hour ago
shifa arshad added a discussion to the group CS605 Software Engineering-II
4 hours ago
shifa arshad joined +M.Tariq Malik's group
4 hours ago
Profile Iconиαвєєℓ αнмє∂ and Ali Fahad joined +M.Tariq Malik's group
5 hours ago
shifa arshad replied to +M.Tariq Malik's discussion MGT502 Organizational Behavior GDB No 01 Fall 2020 Solution / Discussion in the group MGT502 Organizational Behavior
7 hours ago
shifa arshad joined +M.Tariq Malik's group
7 hours ago
+ !! SARAH replied to Hafiza Tehreem Fatima's discussion BIRTHDAY CELEBRATION OUR BELOVED <MEMBER SARAH ABDUL
7 hours ago
+ ᴄᴏғғᴇᴇ updated their profile
7 hours ago
Rizwan Mushtaq joined +M.Tariq Malik's group
8 hours ago
Arooj Shahid liked 乇メ-丂イひり3刀イ.'s discussion *** My Drawing ***
8 hours ago
Arooj Shahid liked 乇メ-丂イひり3刀イ.'s discussion *** الوداع اردو ***
8 hours ago
Arooj Shahid liked Miss. Churhail's discussion LOVE YOUR LIFE!!!!!
8 hours ago
Arooj Shahid liked Hafiza Tehreem Fatima's discussion BIRTHDAY CELEBRATION OUR BELOVED <MEMBER SARAH ABDUL
8 hours ago
Arooj Shahid liked Omar's discussion Dua
8 hours ago
+!!! ❤️ Shadow Girl❤️!!! liked 乇メ-丂イひり3刀イ.'s discussion *** الوداع اردو ***
9 hours ago
+!!! ❤️ Shadow Girl❤️!!! liked Hafiza Tehreem Fatima's discussion BIRTHDAY CELEBRATION OUR BELOVED <MEMBER SARAH ABDUL
9 hours ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion MGT201 Financial Management GDB No 01 Fall 2020 Solution / Discussion in the group MGT201 Financial Management
9 hours ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion MGT201 Financial Management GDB No 01 Fall 2020 Solution / Discussion in the group MGT201 Financial Management
9 hours ago
Profile IconSaba Shahzadi, waqar, Hammad Syed and 12 more joined Virtual University of Pakistan
9 hours ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion ENG001 Elementary English GDB No 01 Fall 2020 Solution / Discussion Last Date: 04-12-2020 in the group ENG001 Elementary English
9 hours ago

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

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

.