Likes

C# LAB at HoM 17.

Sandy is creating a project report by using a computer running Windows 7 as its operating system. To avoid any error in the final project report, he wants to take backup of the project data to a desired location at regular intervals of time. Further, he wants to restore the backup data. Help Sandy to accomplish the preceding requirements. Hint 1: The Backup and Restore link can be used to backup and restore data. Hint 2: The Backup and Restore link can be accessed from the Control Panel window.


1.select Start.
2.select Control panel.
  the all cotrol panel ltems window is displayed.
3.click the Backup and Restore link.
  the backup and restore window is displayed.
4.click the set up backup link.
  the set up backup dialog box is displayed.
  the select where you want to save your backup page is displayed.
  select the drive where the backup data will be stored.
5.click the next button.
  the whet do you want to back uo? page is displayed.
6.select the let me choose option.
7.click the next button.
  the set up backup dialog box is displayed.
  the what do you want to back up? page is displayed.
  select the chect box for the drive where the data to be back up is stored.
8.click the next button.
  the review your backup setting page is displayed.
9.click the seve setting and run backup button.
  the backup and restore window is displayed.
  wait for the back up process to complete.
  close the backup and restore window.
10.select start.
11.select control panel.
   the all cotrol panel ltems window is displayed.
12.click the Backup and Restore link.
   the backup and restore window is displayed.
13.click the restore my files button.
  the restore file dialog box is displayed.
14.click the browse for folders button.
  the browse the backup for folders or drives dialog box is displayed.
  select the folder or drive to be restored.
15.click the folder button.
16.click the next button.
  the where do you to restore your files? page is displayed.
  Ensure that the in the original location option is selected.
17.click the restore button.
  the Restoring files page is displayed.
  the copy file dialog box is displayed.
18.select the do this for all conflicts check box.
19.click the do not copy button.
  the your files have been restored page is displayed.
20.click the finish button.
  close the backup and restore window.





Write an application that creates a class named Registration. The application would be used by the counselors of an IT education center, while registering students. The registration data entry is done differently for Career registration and for Modular registration. Your application should have separate class for the two categories of students. In case of Career registration, you need to record the student's marks of the aptitude test. In case of Modular registration, you need to record the student's prior experience or knowledge. Hint: Use delegate in the Registration class while registering a student to call the appropriate methods.


using System;
namespace DelegateExample
{
class DelegateExample
{
public abstract class Student {  }
public class Modular:Student
{
public void GetExperience()
{
string name;
string experience;
Console.WriteLine("Enter your name");
name=Console.ReadLine();
Console.WriteLine("Enter the experience of the student in years:");
experience=Console.ReadLine();
Console.WriteLine("\n{0} has {1} experience",name, experience);
}
}
public class General : student
{
public void Aptitute()
{
string name;
string marks;
Console.WriteLine("n\Enter your name:");
name=Console.ReadLine();
Console.WriteLine("Enter the marks of the aptitude test:");
marks=Console.ReadLine();
Console.WriteLine("\n{0} has got {1} marks in the aptitude test",name,marks);
}
}
public class Registration
{
public delegate void RegistrationType();
public RegistrationType Register;
public void DoRegistration(RegistrationType R)
{
Register =R;
}
public void DoNextRegistration()
{
if (Register!=null)
{
Register();
}
}
}
static void Main (string [] args)
{
string s;
Console.WriteLine("Enter the Registration type(career/Modular):");
s=Console.ReadLine().ToUpper();
Registration Reg=new Registration();
Modular Mod=new Modular();
General Gen=new General();
if (s=="MODULAR")
{
Reg.DoRegistration (new Registration.RegistrationType(Mod.GetExperience));
Reg.DoNextRegistration();
}
else if(s=="CAREER")
{
Reg.DoRegistration(new Registration.RegistrationType(Gen.Aptitute));
Reg.DoNextRegistration();
}
else
Console.WriteLine("Invalid registration type");
Console.ReadLine();
}
}
}

No comments: