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

Looking For Something at Site? Search Below

Please read the following instructions carefully before submitting assignment.

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 corrupt.
  • Assignment is copied(partial or full) from any source (websites, forums, students, etc)

 

 

Objective

 

The objective of this assignment is:

  • Learn to code, edit, compile and execute C++ program.
  • Learn to manipulate and navigate through text files.
  • Learn to create and use user defined functions.
  • Learn to use string manipulation functions.

Guidelines

 

  • Code should properly be indented and well commented.
  • Follow C/C++ naming conventions while using variables, functions etc.
  • Use only Dev-C++ for this assignment. If you are using any other tool then mention it at top of your code file as comments.

 

Assignment Description

 

In this assignment, you are required to write c++ code that will protect the provided text file using the protection mechanism given in guidelines. It will also check the security of file and if any change is made in the contents of protected file, it will point out the file as changed.

 

Protection mechanism:

The program will protect the file by generating a protection key on the basis of contents of the file. The key will be saved at the end of the file with “%” symbol as prefix. This key will be used to detect either the file contents are changed or not e.g. if file contents are changed the new key generated will not match the existing one, leading to conclusion that file contents have been changed.

 

Solution guidelines

The program should operate in following sequence.

  • Program will prompt the user to enter the file name in current directory.
  • System will show a menu with two options:
    • Protect the file
    • Check security status
  • In case user selects the first option (i.e. protect the file), the system will perform the following steps:
    • Read the file
    • Check if the file is already protected or not.
    • In case if file is not protected, program will protect it by the protection mechanism defined above.
    • If file is already protected, system will display appropriate message and exit.
  • If user selects the second option (i.e. check security status), the system will perform following steps:
    • Read the entire file and if key does not exist (i.e. file is not already protected), program will display the message to protect the file first and display menu.
    • If file is already protected, the system will read the contents along with the already existing key. On the basis of contents read, a new key will be generated. If this new key and the existing one (read from the file) do not match, it means that the contents of protected file are changed and vice versa.

 

Important note

A text file (data.txt) is attached with assignment, use it for protection checking. Video file (Output-Demo.mp4) of desired function is also attached with assignment. Watch the demo video carefully to understand the required functionality (output) of program. Your program should work as per functionality performing in demo video file. You do not need to send text file with your solution. Just upload .cpp file from your LMS account. For any query related to assignment no. 3 contact us at cs201@vu.edu.pk.

Submission

You are required to submit your solution C++ program through LMS i.e. .cpp file. 


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

Replies to This Discussion

i m student of IT and in 1st smestar i really want to learn programming  i m really so worry about it can anyone help me to understand the programming  

@ayeeza i think you will learn 201 in 2nd semester 

why you are worried about it now?

but i want to learn it now i must be able to complete my assignment without any help but i m not :(  i can not do it myself :(

Don't worry Ayeeza,

You can really do it. just try to concentrate on all of it's lectures whose are mentioned in course overview and take all of them properly. after that, if you will still have some questions then you should consult with google & with your course instructor as-well through MDB or through e-mail. http://www.cplusplus.com/reference/ this site will help you a-lot as-well.

Good luck

ayza do not worry about it.you can learn simply try it if face any problem you may conern..:)

yes brother i want to know.... please brief me.

plz tell me logic n algorithm of the assignment

*********

M Ilyas | (BSCS 2nd) email ,cell no sharing etc is not allowed at the site.thanks for understanding 

anyone in BSCS from Gujrat near city please contact PM me i want to join him for combine study..

any body give the idea .........

RSS

Latest Activity

+M.Tariq Malik replied to +M.Tariq Malik's discussion ACC501 Business Finance GDB No 01 Fall 2020 Solution / Discussion in the group ACC501 Business Finance
56 seconds ago
+M.Tariq Malik liked +M.Tariq Malik's discussion ACC501 Business Finance GDB No 01 Fall 2020 Solution / Discussion
1 minute ago
Humaira Khadim added a discussion to the group PSY402 Experimental Psychology
2 minutes ago
Humaira Khadim joined +M.Tariq Malik's group
3 minutes ago
+M.Tariq Malik added a discussion to the group ACC501 Business Finance
3 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion EDU401 Contemporary Issues and Trends in Education Assignment 01 Fall 2020 Solution / Discussion in the group EDU401 Contemporary Issues and Trends in Education
6 minutes ago
+M.Tariq Malik liked +M.Tariq Malik's discussion EDU401 Contemporary Issues and Trends in Education Assignment 01 Fall 2020 Solution / Discussion
6 minutes ago
+M.Tariq Malik added a discussion to the group EDU401 Contemporary Issues and Trends in Education
6 minutes ago
Profile IconAli Shan, Bushra ilyas, maham and 15 more joined Virtual University of Pakistan
7 minutes ago
+M.Tariq Malik replied to Nazim Ali's discussion Assignment No. 01 Semester: Fall 2020 Software Engineering-1 (CS504) in the group CS504 Software Engineering - I
15 minutes ago
+M.Tariq Malik replied to Nazim Ali's discussion Assignment No. 01 Semester: Fall 2020 Software Engineering-1 (CS504) in the group CS504 Software Engineering - I
16 minutes ago
+M.Tariq Malik liked ++!!Zuni Khan(Am Cyco)'s discussion cs504 assignment No .1 fall 2020
25 minutes ago

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

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

.