Practical No.- 1 Aim: Familiarization with computer system 1. To explain the part of the computer system such as system unit, input devices, output devices connected to the computer. 2. To explore the outside view of the system unit that includes the panels on front and ports at the rear. 3. To explore the inside view of the system unit that includes the motherboard, processor, expansion slots, various add-on cards, storage devices, power supply, fans. 4. To understand the booting process that includes switching on the system, execution of POST routine, then bootstrap loader, and loading of the operating system, and getting it ready for use. 5. To introduce the graphical user interface (desktop) of Windows operating system. 6. To explain the various elements of the desktop such as taskbar, icons (My Computer, Recycle Bin, etc.), short cuts, notification area. 7. To configure the desktop that includes selecting the wall paper, selecting the screen saver with or without password protection, selecting the screen resolution and color quality. A computer is a machine that manipulates data according to a list of instructions. Computer can access & process data millions of times faster than humans can. A computer can store data & information in its memory, process them & produce the desired results. Computer can do a lot of different tasks such as playing games, railway reservation etc.
1. To explain the part of the computer system such as system unit, input devices, output devices connected to the computer. System Unit / CPU The CPU is the control center for a computer. It guides, directs & governs its performance. It is the brain of the computer. CPU CONTAINS: 1. Arithmetic & Logical Unit 2. Control Unit ARITHMETIC & LOGICAL UNIT 1
An Arithmetic and Logical Unit (ALU) is a digital circuit that performs arithmetic and logical operations. The ALU is a fundamental building block of the central processing unit (CPU) of a computer. ALU is a combination of Arithmetic Unit & Logical Unit. ARITHMETIC UNIT Arithmetic Unit performs all the arithmetic operations like addition , subtraction , multiplication & division performed on the operands. For example : a+b a-b a*B a/b CONTROL UNIT Control Unit is most important part which controls all the internal as well as external functions in the computer. THE MAIN FUNCTIONS PERFORMED BY THE CONTROL UNIT ARE : 1. It controls & guides the interpretation , flow & manipulation of all data & information. 2. It sends control signals until the required operations are done properly by ALU & memory. 3. It gets program instructions from memory & executes them one after another. 4. It controls the flow of data from input device to memory & from memory to output devices. Input Devices The input unit is formed by the input devices attached to the computer. Example - Keyboard, Microphone etc. An input unit takes the input & converts it into binary form so that it can be understood by the computer. KEYBOARD This is most commonly used device which acts as input device. Its structure is like typewriter.It contains no. of keys which have some specific ASCII values. Like ‘A’ has ASCII value 65. When this is pressed , it is converted into 65 & this 65 is sent to CPU in the form of Binary language (i.e. 1000001). Then operations are done on this data. MOUSE This is a pointing device which contains a roller in its base. When the mouse is moved on any surface, the pointer on the screen is also moved. It contains a potentiometer coupled with the roller. This potentiometer senses the motion of mouse & convert it into digital value. A mouse may contain two or three buttons. Now a day's optical mouse are very popular. BAR CODE READER It is a device which is used to read the code from the products which are usually in the form of Bars. It contains a light sensitive detector which identifies the values of the bars on the product & converts them into numeric code. These Bar readers are used in Shopping malls in a very large scale. DIGITAL CAMERA As the name specifies, these camera stores the data digitally, which then can be stored in the computer & can be stored for a long time. But it has very limited storage capacity. These are very popular because of less expensive photographs & Speed. LIGHT PEN It is a pointing device which contains a photocell mounted at its tip. It senses the light from the 2
screen when it becomes closer to the screen, & generates a pulse. So for identifying a particular location on the screen these light pens are very useful. But this is not in very much use these days. SCANNER The scanner is an input device like the photocopier machine which makes the electronic copy of the picture or document which can be further edited. MIC's or MICROPHONES The scanner is an input device like the photocopier machine which makes the electronic copy of the picture or document which can be further edited Output devices The devices which are used to display the data to the user either in the form of hard copy or soft copy are called output devices. SPEAKERS Speakers receive the sound in the form of electric current from the sound card & convert it to sound format. These are used for listening music, chatting , seminars for presentations etc. VDU (Visual Display Unit) This is also called monitor. It is used to get the data in the form of soft copy. Their functioning is exactly similar to the television. It contains a CRT which emits the electrons to trace a regular pattern of horizontal lines on the screen. PRINTER These devices gives the hard copy of the output. These are in different types. Impact - Have mechanical contact in between paper & printing head Non Impact - No mechanical contact between paper & printing head IMPACT : Line Printers - print line wise (E.g. Drum Printer) Character Printer - print character wise (E.g. Daisy Printer) NON IMPACT Electromagnet Printers Thermal Printers Electrostatic Printers Inkjet Printers Laser Printers LCD (Liquid Crystal Display) These screens are used in laptops & notebook sized PCs. A special type of liquid is sandwiched between two plates. The top plate is clear & bottom plate is reflective. The molecules in these liquids are normally aligned & the computer signals are used to align these molecules.
2. Explore the outside view of the system unit that includes the panels on front The illustration below shows the most common hardware in a desktop computer system. Your system may look a little different, but it probably has most of these parts. A laptop computer has 3
similar parts but combines them into a single notebook-sized package.
System unit The system unit is the core of a computer system. Usually it's a rectangular box placed on or underneath your desk. Inside this box are many electronic components that process information. The most important of these components is the central processing unit (CPU), or microprocessor, which acts as the "brain" of your computer. Another component is random access memory (RAM), which temporarily stores information that the CPU uses while the computer is on. The information stored in RAM is erased when the computer is turned off. Almost every other part of your computer connects to the system unit using cables. The cables plug into specific ports (openings), typically on the back of the system unit. Hardware that is not part of the system unit is sometimes called a peripheral device or device.
Storage Your computer has one or more disk drives—devices that store information on a metal or plastic disk. The disk preserves the information even when your computer is turned off. Hard disk drive Your computer's hard disk drive stores information on a hard disk, a rigid platter or stack of platters with a magnetic surface. Because hard disks can hold massive amounts of information, they usually serve as your computer's primary means of storage, holding almost all of your programs and files. The hard disk drive is normally located inside the system unit. 4
Hard disk drive
CD and DVD drives Nearly all computers today come equipped with a CD or DVD drive, usually located on the front of the system unit. CD drives use lasers to read (retrieve) data from a CD, and many CD drives can also write (record) data onto CDs. If you have a recordable disk drive, you can store copies of your files on blank CDs. You can also use a CD drive to play music CDs on your computer. CD
DVD drives can do everything that CD drives can, plus read DVDs. If you have a DVD drive, you can watch movies on your computer. Many DVD drives can record data onto blank DVDs. Floppy disk drive Floppy disk drives store information on floppy disks, also called floppies or diskettes. Compared to CDs and DVDs, floppy disks can store only a small amount of data. They also retrieve information more slowly and are more prone to damage. For these reasons, floppy disk drives are less popular than they used to be, although some computers still include them. Floppy disk
Printer A printer transfers data from a computer onto paper. You don't need a printer to use your computer, but having one allows you to print e-mail, cards, invitations, announcements, and other materials. Many people also like being able to print their own photos at home. The two main types of printers are inkjet printers and laser printers. Inkjet printers are the most popular printers for the home. They can print in black and white or in full color and can produce high-quality photographs when used with special paper. Laser printers are faster and generally better able to handle heavy use.
5
Speakers Speakers are used to play sound. They may be built into the system unit or connected with cables. Speakers allow you to listen to music and hear sound effects from your computer.
Modem To connect your computer to the Internet, you need a modem. A modem is a device that sends and receives computer information over a telephone line or high-speed cable. Modems are sometimes built into the system unit, but higher-speed modems are usually separate components.
1. Inside view of the system unit that includes the motherboard, processor, expansion slots, various add-on cards, storage devices, power supply, fans. POWER SUPPLY The power supply is vital to the computer as it is the source of power. The power supply is usually a small metal box in the top corner of a case (tower). ACCESS SLOTS Access slots or expansion slots are openings in a computer where a circuit board can be inserted to add new capabilities to the computer. Examples of drives that may go here would be modems, USB drives, networking cards, video adapters, and sound cards. These expansions are easy to install along with being very useful to your computer to allow you to do new things, such as network computers together. MOTHERBOARD The motherboard has been an integral part of most personal computers for more than 20 years. The motherboard contains various circuit cards performing various functions all plug into many similar sockets on a common circuit board. Each circuit card performs a unique function in the computer and gets its power from the socket. 6
The motherboard contains many circuits and slots, but let's focus on some of the important ones. The motherboard is home to the processor (CPU) along with the access slots and RAM. If we look at the diagram above I've labeled the parts of the motherboard that I wanted to discuss. The objects labeled 1 are the access slots. 2 is the processor slot and 3 are slots to hold memory (RAM). RAM Random Access Memory (RAM) is the form of memory contained in most computers. RAM is considered "random access" because you can access any memory cell directly if you know the row and column that intersect at that cell. When an application is running it stores its information in the RAM. When you close the application the information is deleted from the RAM. This is why you need certain amounts of RAM to run applications. The more RAM you have the faster your computer will be, and the more applications you'll be able to run without loosing speed. HARD DRIVE Nearly every desktop computer and server in use today contains one or more hard-disk drives. These hard disks do one thing well - they store changing digital information in a relatively permanent form. They give computers the ability to remember things when the power goes out. A hard drive stores all your files and information in a permanent form unlike storing it in RAM (which is temporary). The larger your hard disk (drive) the more information and files you're able to store. Today's average hard drive is 40 GB although slowly 80 GB hard drives are becoming used more often. STEPS TO SWITCH ON THE COMPUTER: 1. Switch on the UPS. 2. Switch on the monitor. 3. Press the power key of the CPU to start the machine. STEPS TO SWITCH OFF THE COMPUTER: 4. Click on START. 5. Select TURN OFF YOUR COMPUTER OPTION option. 6. Click on SHUT DOWN to turn off. 7. Switch off the monitor. 8. Switch off the UPS. 4.To understand the booting process that includes switching on the system, execution of POST routine, then bootstrap loader, and loading of the operating system, and getting it ready for use. BIOS routines are the first thing that begin when the computer is turned on. They are made up of 3 main operations: First, the Power On Self Tests (POST) are conducted. These tests verify that the system is operating correctly and will display an error message and/or output a series of beeps known as beep codes depending on the BIOS manufacturer. Second, is initialization in which the BIOS looks for the video card. In particular, it looks for the video card's built in BIOS program and runs it. The BIOS then looks for other devices' ROMs to see if any of them have BIOSes and they are executed as well. Third, is to initiate the boot process. The BIOS looks for boot information that is contained in file called the master boot record (MBR) at the first sector on the disk. If it is searching a floppy disk, it looks at the same address on the floppy disk for a volume boot sector. Once an acceptable boot record is found the operating system is loaded which takes over control of the computer. 7
The order that the BIOS looks for devices can be determined in your BIOS settings. Usually it searches in this order CD Drive, Floppy, C Drive.
5. To introduce the graphical user interface (desktop) of Windows operating system. A window is a (usually) rectangular portion of the display on a computer monitor that presents its contents (e.g., the contents of a directory, a text file or an image) seemingly independently of the rest of the screen. Windows are one of the elements that comprise a graphical user interface (GUI). A GUI is a type of human-computer interface (i.e., a system for people to interact with a computer) that uses windows, icons, pull-down menus and a pointer and that can be manipulated by a mouse (and usually to some extent by a keyboard as well). An icon is a small picture or symbol that represents a program (or command), file, directory (also called a folder) or device (such as a hard disk or floppy disk). The GUI represents a major advance over the command line interface (CLI) of the console, which displays only text (i.e., no images) and is accessed solely by a keyboard. It has made computers much easier to learn and work with, and it has also led to the development of major new applications for them, including desktop publishing and CAD (computer-aided design). The words window and windows are generic terms and should not be confused with Microsoft Windows (although they sometimes are). The latter is the trade name that Microsoft selected for its series of operating systems that employ a GUI. (The originally intended name was Interface Manager, but Microsoft's marketing expert Rowland Hanson convinced co-founder Bill Gates that Microsoft Windows was preferable).
6. To explain the various elements of the desktop such as taskbar, icons (My Computer, Recycle Bin, etc.), short cuts, notification area. 8
The Windows XP Taskbar Overview
Figure shows a typical Windows XP Taskbar. We have pointed out the areas of interest, these are explained below: Start Button - The Start Button is used to access the Windows XP start menu (covered in part 2 of our windows xp tutorial). Window Tabs - The Windows tabs are used to switch between any open windows (programs, folders, documents, etc). In our example we have 2 windows open (word and excel). You can switch between the windows by simpy clicking on the corresponding window tab, clicking a second time on the same tab will minimise the window. The Quick Launch Bar By default, Windows XP has the quick launch bar hidden, if you want to use the quick launch bar you need to activate it. To do this simply right click on the taskbar, hover the mouse pointer over toolbars and then put a tick in the box next to Quick Launch. The Windows XP quick launch bar (see fig 1.2) provides direct access to your programs, files or folders with just one click. The quick launch bar is visible (by default) even when you have a window open.
- Show Desktop Icon - This icon is used to minimise all open windows to show the windows xp desktop, clicking again will restore the windows to their previous state. 9
- Internet Explorer Icon -This icon will open Microsoft's Internet Explorer browser. Adding icons It is very straight forward to add icons to the quick launch bar. Simply drag the icon of the program/file/folder over the quick launch bar and drop it (release the mouse button). If you add or delete icons you can increase or decrease the size of the quick launch bar by moving the divider (see fig 1.2) left or right. Deleting icons It is also very easy to delete icons from the quick launch bar. Right click (click with the right hand mouse button) on the icon you want to delete and then select delete from the menu that appears. note: removing the icon will not uninstall the associated program/file/folder from your PC. The System Tray In the system tray you will find icons belonging to some of the programs that are currently running, as well as the clock.
There are normally a couple of icons residing in the system tray. In our example (fig 1.3) we have 2 icons, your icons will depend on what programs you have running on your PC. Some typical programs would be your firewall (if you have one), antivirus software, printer status monitors and some messenger programs. When you install some software it will automatically set itself to load when you start your PC, when these programs are running they are using your computer's resources. If there are any programs running that you don't need, for instance messenger programs, you can stop them running by right clicking and using their menu to close them. If you want to stop a program loading when you first start your machine, either use the setting within the software itself or another option is to use the msconfig utility (we will cover msconfig in future sections).
10
7. To configure the desktop that includes selecting the wall paper, selecting the screen saver with or without password protection, selecting the screen resolution and color quality. How to set up the desktop wallpaper (Windows) Simple method 1.Click the "Open Image" button to display the selected image, right-click on the displayed image, and select "Select as Desktop Background" to apply the new picture to your desktop. (This may cause your previously set desktop background to be overwritten.) This completes the setup process.
Practical No. - 2 Aim: Navigating with Window Explorer 1. To navigate with the drives 2. To create new folders 3. To move folders from one drive to another drive 4. To move files from one folder to another folder 5. To search files and folders 11
6. To share files and folders 7. To view and/or change the attributes of the files and folders 1. To navigate with the drives Windows Explorer is the main tool that you use to interact with Windows 7. You’ll need to use the Windows Explorer to view your libraries, files, and folders. You can access Windows Explorer by clicking the Start menu and then clicking either Computer or one of your many folders, such as Documents, Pictures, or Music.
The following tools make it easy to use Windows Explorer: The Navigation pane. On the left side of the Windows Explorer window, you can click an
item to see the files within. Items in the Navigation pane can include folders (such as Downloads); the Favorites list; the Windows 7 libraries (such as Documents and Music); other computers in your Homegroup; other drives on your computer; or other computers on the network. Use the “breadcrumb” navigation bar to move around. Click the wedges at the top of the Windows Explorer window to select from available folders. Windows 7 lacks the Up One Level folder button found in Windows XP. However, you can usually go up one level in Windows 7 by holding down the Alt key and pressing the up arrow. Also, the folder one level up normally appears in the "breadcrumb" at the top, so you can just click it there. 12
Details box. If you click a file or folder once, details for it appear in the Details box at
the bottom of the Windows Explorer window. Command bar. Most of the actions you might want to perform are listed in the
Command bar. Many other actions are accessible by right-clicking the file or folder. Hidden menu bar. If you click Alt, Windows Explorer shows you the old menu bar (File,
Edit, View, Tools, Help) from previous versions of Windows with dozens of functions tucked away. When Windows Explorer opens for the first time, you’ll see the Large Icons view. Although it's impressive, if you’re looking through a folder that contains many files, you’ll probably want to switch to Details view (click the Views button and choose Details). You’ll see a much more succinct list that requires less scrolling.
Windows Explorer starts off in Large Icon view. The other advantage to Details view is that you can sort the list of files by clicking one of the column headings — Name or Date Modified, for example. You can right-click one of the column headings and choose More to change what columns are visible. Every Windows Explorer window has a button in its upper-right corner, next to the Help question mark, that lets you turn on the Preview pane — a strip along the right side of the window that, in many cases, shows a preview of the file you selected. This is a cool but slow feature. Unless you really need it, you’ll probably want to turn off the Preview pane. 13
2. Create a new folder Folders are a convenient way to store and organize files on your computer. For example, you'll probably want to create folders within the Documents and Pictures folders to help you manage your files. You can create any number of folders and even store folders inside other folders. Folders located inside other folders are often called subfolders. 1. Go to the location (either a folder or the desktop) where you want to create a new folder. 2. Right-click a blank area on the desktop or in the folder window, point to New, and then click Folder. 3. Type a name for the new folder, and then press ENTER. 3. To move folders from one drive to another drive open the C: drive containing the folders you want to move, then open E: drive. Right click the task bar and select 'Show windows side by side' If needed, make new folders on E: If you right click, hold and drag a folder from C: to E: you will be given options to move or copy, take your pick. When done, right click task bar and undo side by side. 4. To move files from one folder to another folder You can move your files and folders in Windows XP. Moving a file or an entire folder (including its contents) allows you to organize your files better or create a more logical structure of files to navigate through. Windows XP makes it a simple process to move files or folders to a different location. Choose Start→All Programs→Accessories→Windows Explorer. The Start button is located at the bottom, left-hand corner of your screen.
5.
Locate the file that you want to move. Double-click a folder or series of folders to locate the file.
14
6. Move the file. You can move the file one of two ways. Your first option is to click and drag the file to another folder in the Folders pane on the left side of the window. Your second option is to right-click the file and choose Send To. Then choose from the options shown in the submenu that appears. If you use right-click and drag, you are offered the options of moving or copying the item when you place it via a smart-tag (a little icon that appears). And if you want to create a copy of a file or folder in another location on your computer, right-click the item and choose Copy. Use Windows Explorer to navigate to the location where you want to place a copy, right-click, and choose Paste or press Ctrl+V. Click the Close button. You can find the Close button in the upper-right corner of the Windows Explorer window to close the window 5. To search files and folders Use the search box on the Start menu You can use the search box on the Start menu to find files, folders, programs, and e-mail messages stored on your computer. To find an item using the Start menu: Click the Start button , and then type a word or part of a word in the search box. Search results appear as soon as you start typing in the search box.
15
As you type, items that match your text will appear on the Start menu. The search results are based on text in the file name, text in the file, tags, and other file properties.
Practical No.- 3 16
Working with Control Panel: 1. To work with date and time 2. To create new user accounts 3. To install new hardware and configuring existing hardware 4. To install new software or remove existing installed software 5. To configure network connections 6. To manage security profile A Macintosh utility that permits you to set many of the system parameters. For example, you can control the type of beeps the Mac makes and the sensitivity of the mouse. On older Macs (System 6 and earlier), control panels are called cdevs. The Windows operating system has a Control Panel program that offers many of the same features as the Macintosh control panels. 1.
To work with date and time
Setting the Date and Time Keep your system time accurate, because Windows uses it to time-stamp files and email, schedule tasks, and record events. TIP If the clock doesn't appear in the notification area, right-click an empty area of the notification area, choose Customize Notification Icons, click Turn System Icons On or Off, and then turn on Clock. To set the date and time: 1. Choose Start > Control Panel > Clock, Language, and Region > Date and Time. or Click the clock in the taskbar's notification area; then click Change Data and Time Settings. or Right-click the taskbar clock and choose Adjust Date/Time. or Choose Start, type date and time in the Search box, and then press Enter. 2. On the Date and Time tab (Figure 4.37), click Change Date and Time, adjust the date and time as needed (Figure 4.38), and then click OK.
Figure 4.37 You have to be an administrator to change the date or time, but not the time zone.
17
Figure 4.38 To set the time in the Time box, type new numbers, press the up- and downarrow keys, or click the small up and down arrows. Click the small arrow at the top of the calendar to change months. 3. On the Date and Time tab, click Change Time Zone, choose your time zone from the drop-down list (Figure 4.39), and then click OK.
Figure 4.39 Windows assumes that you want to automatically adjust the clock for daylight saving time. Uncheck this box if you don't want to use daylight saving time. 4. On the Additional Clocks tab, you can add more clocks that show the time in other time zones (Figure 4.40 and Figure 4.41).
Figure 4.40 Add clocks that show the time in other parts of the world and view them by...
Figure 4.41 ...clicking the taskbar clock. 5. On the Internet Time tab, click Change Settings, check Synchronize With an Internet Time Server to synchronize your computer clock with a highly accurate clock (Figure 4.42), and type or choose any time-server address in the Server box.
Figure 4.42 When your computer is shut down, the motherboard battery maintains the time. Once a week is the only interval you get unless you click Update Now. 6. Click OK (or Apply) in all open dialog boxes. 2.To create new user account When you add a user to your computer, you are allowing that individual to have access to files and programs on your computer. The steps to perform this task differ depending on whether your computer is a member of a network domain or is part of a workgroup (or is a stand-alone computer). My computer is on a domain 18
You must be logged on as an administrator or a member of the Administrators group in order to complete this procedure. If your computer is connected to a network, network policy settings may also prevent you from completing this procedure. 1. Open User Accounts in Control Panel. 2. On the Users tab, click Add. 3. Follow the instructions on the screen to add a new user Note • Add New User gives an existing domain user permission to use the computer. • You can only add existing domain users by using User Accounts. To add a new local user, on the Advanced tab, click the Advanced button. In Local Users and Groups, click Users, and then on the Action menu, click New User. • You should not add a new user to the Administrators group unless the user will perform only administrative tasks. For more information, click Related Topics. My computer is not on a domain You must have a computer administrator account on the computer to add a new user to the computer. 1. 2. 3. 4.
Open User Accounts in Control Panel. Click Create a new account. Type a name for the new user account, and then click Next. Click Computer administrator or Limited, depending on the type of account you want to assign to the new user, and then click Create Account.
3.To install new hardware and configuring existing hardware If you've added some hardware but it doesn't work, try these troubleshooting steps, in this order: Try the troubleshooters included in the Help system, assuming the hardware fits into one of the neatly packaged categories. Open them through the Help and Support page: Click Start, Help and Support, then type in the name or category for the device you're working with. Try rebooting Windows 7. Use System Information and the Device Manager to check resources assigned to the hardware to be sure there are no conflicts. Check the hardware manual to determine whether you should be setting DIP switches or jumpers to avoid conflicts if the device isn't PnP compatible. Open the Device Manager, locate the device entry, and press the Delete key to delete it. Then, power down, remove the device, and restart Windows. Power down again, reconnect the hardware (run the Add Hardware Wizard, also known as hdwwiz, if the hardware isn't detected at bootup), and configure as necessary. Check Google; search to see if anyone else has posted about the problem and its solution. Check the manufacturer's website. If it has a "Knowledge Base," search that. If you purchased the hardware from a local store, contact it for assistance. Contact the manufacturer via email or phone. 4. Install new software or remove existing installed software 19
Creating a Software Installation Snap-in Tool To create the Software Installation snap-in: 1. Log on to the HQ-RES-DC-01 server as an administrator. 2. Click Start, click Run, type mmc, and then click OK. 3. In the MMC console, click Add/Remove Snap-in on the Console menu. 4. In the Add/Remove Snap-in dialog box, click Add. 5. In the Add Stand-alone Snap-in dialog box, click Active Directory Users and Computers on the Available Standalone Snap-ins list, and then click Add. Click Close, then click OK. 6. In the console tree, double-click Active Directory Users and Computers to expand the tree, double-click the reskit.com domain, double-click the Accounts organizational unit (OU). 7. Click the + next to the Headquarters OU. Saving the Software Installation Snap-in Tool As you go through this guide, you may want to save changes to the MMC console. To save your changes: 1. In the MMC console, click Save on the Console menu. 2. In the Save dialog box, type SIM Tool in the File name text box, and then click Save. Your snap-in will look similar to Figure 1 below.
Figure 1: Software Installation Snap-In Creating a Group Policy Object If you have already completed the Group Policy step-by-step guide, then you may have already created the necessary Group Policy objects (GPOs). To create a Group Policy Object (GPO): 1. In the Software Installation snap-in tool you just saved (SIM Tool console), in the console tree, double-click Active Directory Users and Computers, double-click reskit.com, and then double-click Accounts. 2. Right-click Headquarters, and select Properties from the context menu. 3. In the Headquarters Properties dialog box, click the Group Policy tab, and then click New. 4. Type HQ Policy. This creates a new Group Policy object called HQ Policy. At this point, you could add another GPO—giving each one that you create a meaningful name—or you could choose to edit a GPO, which starts the Group Policy and Software 20
Installation snap-ins. If you have more than one GPO associated with an Active Directory folder, verify the order; a GPO that is higher in the list is processed first. 5. Click Close. Best Practice Consider using security descriptors (DACLs) on the GPO to increase the granularity of software management for your organization. To close the Software Installation snap-in: 1. In the SIM Tool console, click Save on the Console menu. 2. Click Exit on the Console menu. To edit a Group Policy Object (GPO): 1. Log on to the HQ-RES-DC-01 server as an administrator. 2. Click Start, point to Programs, click Administrative Tools, and then click SIM Tool. 3. In the SIM Tool console, double-click Active Directory Users and Computers, doubleclick reskit.com, and then double-click Accounts. 4. Right-click Headquarters, and select Properties from the context menu. In the Headquarters Properties dialog box, click the Group Policy tab. Right-click HQ Policy in the Group Policy Object Links list box, and click Edit.
Figure 2: Group Policy Snap-In You can use the Software Settings node in the console tree under HQ Policy and Computer 5. To configure network connections Checking Network Connection Settings 1. Launch the "Network Connections" Control Panel. o From the desktop, click the "Start" button. o Within the "Start" menu, click "Control Panel."
21
o
In the Network Connections window, you will see an icon for each type of network connection you have. Right-click the icon for your Hubris Internet connection, and choose "Properties" from the menu that appears.
o o o
Click the "Network" tab, then... Click "Internet Protocol (TCP/IP)", then... Click the "Properties" button.
22
o
In this window, your settings should match those shown here. It is important that you select "Obtain an IP address automatically" and "Obtain DNS server address automatically."
Practical No.- 4 23
Aim: Miscellaneous Features: 1. To work at the command prompt. 2. To open an application, folder, document or internet resource from the Run command. 3. To initialize storage media (formatting). 4. To understand the menace of viruses. 5. To understand the working of virus guards and antivirus software. 1. To work at the command prompt. The Command Prompt program allows you to work in an environment that looks more like a traditional operating system as opposed to the icon based Windows environment. In Command Prompt, you will use your keyboard. You won't use your mouse at all. Command Prompt works at a lower level than Windows. This means that you will have more control over the machine. The disadvantage is that it is less user-friendly. You will need the command prompt in COS 126 to compile and execute your Java programs. Learning the Command Prompt also provides a gradual transition to Unix and Linux systems, which are prevalent in science, engineering, and industry. To launch Command Prompt select Start -> Run and type cmd in the box. The Command Prompt shows up as a black terminal window. The command prompt should look something like: C:\> This is where you type commands. The boldface type below (that follows the command prompt) is what you should type as you work through this tutorial. Windows does not care if you use upper or lower case. That means that command cd is the same as CD. It also means that, in Windows, file HelloWorld.java is the same as helloworld.java. This is NOT true in the system to which you will be submitting your files. 2. To open an application, folder, document or internet resource from the Run command. Create a shortcut of a favorite folder (eg Music) Rename the shortcut nicely (eg tunes) Put the shortcut in c:\Documents & settings\YourUserProfile Now press Windows key + R > type tunes > enter Note: Some users might need to put the short cuts in their My Documents directory. You could probably put the shortcut in any folder included in the PATH environment variable. The reason this works is because the Run command starts in the user's home directory by default. 3. To initialize storage media (formatting). Open the "Start" menu if you are able to load the Windows desktop. Click "Computer" and a list of your computer's hard drives recognized by Windows will be displayed. Note the letter assigned to the hard drive that you want to format, such as "D:" or "E:." Note the volume label, too, which might be "Local Disk" or "New Volume." Close the window. If you are unable to load the Windows desktop, skip to Step 3. Open the "Start" menu again and type "cmd" (without quotes) in the search box. Press "Enter." Windows displays the command prompt Type "format (drive letter)" at the command prompt and press "Enter." If you want to format drive "D:", for example, type "format D:" and press "Enter." Type the volume label that you noted in Step 1, if applicable, and press "Enter." Type "Y" to confirm that you want to proceed. Press "Enter" to format the hard drive. 24
Type a new volume label for the hard drive and press "Enter." Alternatively, press "Enter" without typing a volume label to skip naming the hard drive. 4. To understand the menace of viruses. 1. Hold down the Windows key and press "R." The Run box opens. 2. Type "cmd" (without the quotation marks) into the Run box, and click "OK." The Command Prompt opens. 3. Type "attrib -r -a -s -h greek_gift.vbs" (without the quotation marks) into the Command Prompt and press ENTER. This will remove the permissions, or access rights, of the virus. Note that "greek_gift.vbs" should be replaced with the name of the virus you are trying to remove. 4. Type "del greek_gift.vbs" (without the quotation marks) into the Command Prompt and press ENTER. This will delete the virus. Note that "greek_gift.vbs" should be replaced with the name of the virus you are trying to remove.
Practical No.-5 Exploring the Internet: 25
1. 2. 3. 4.
To understand the working of the internet that include the use of protocols, domains, IP addresses, URLs, web browsers, web servers, mail-servers, etc. To create email-account, sending mails, receiving mails, sending files as attachments, etc. To login to a remote computer To search information using search engines 1.
To understand the working of the internet that include the use of protocols, domains, IP addresses, URLs, web browsers, web servers, mail-servers, etc. The Internet relies on a number of protocols in order to function properly. A protocol is simply a standard for enabling the connection, communication, and data transfer between two places on a network. Here are some of the key protocols that are used for transferring data across the Internet. HTTP : HTTP stands for Hypertext Transfer Protocol. It is the standard protocol for transferring web pages (and their content) across the Internet. You may have noticed that when you browse a web page, the URL is preceded by "HTTP://". This is telling the web browser to use HTTP to transfer the data. Most browsers will default to HTTP if you don't specify it. You can test this by typing in say... www.quackit.com (instead of http://www.quackit.com"). HTTPS : HTTPS stands for Hypertext Transfer Protocol over Secure Socket Layer. Think of it as a secure version of HTTP. HTTPS is used primarily on web pages that ask you to provide personal or sensitive information (such as a password or your credit card details). FTP : FTP stands for File Transfer Protocol. It is used to transfer files across the Internet. FTP is commonly used by web developers to publish updates to a website (i.e. to upload a new version of the website). A web browser (not so accurately internet browser, or just browser) is a software application for retrieving, presenting and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier (URI) and may be a web page, image, video or other piece of content.[1] Hyperlinks present in resources enable users easily to navigate their browsers to related resources. A web browser can also be defined as an application software or program designed to enable users to access, retrieve and view documents and other resources on the Internet. Although browsers are primarily intended to use the World Wide Web, they can also be used to access information provided by web servers in private networks or files in file systems. The major web browsers are Chrome, Firefox, Internet Explorer, Opera, and Safari. 2.To create email-account, sending mails, receiving mails, sending files as attachments, etc. Create a new email account 1. In the "Email:" text box type the User you would like to create an email address for. 2. In the "Password:" text box type the Password you would like this User to have. 3. The "Password Strength:" meter will tell if the password you have entered is strong enough. We highly recommend you use a strong password. For more information on this subject? Please see our Knowledgebase article on (Password Strength) 4. In the "Password (Again):" text box type the Same Password you used above to confirm that they are the same. If the passwords do not match please carefully retype the password into both boxes again.
26
5. The "Mailbox quota (optional):" text box is used to specify the amount of your overall hosting storage that will be allocated for that specific email account. The default that should be listed is 250 MB. You can increase or decrease this number as you desire. 6. Once the User, Password, and Quota are all accurate; simply click the "Create Account" button.
View current email accounts Once the email accounts have been created they are listed on the bottom half of the page. You are able tp search for email accounts by email address, username or domain name.
Delete email accounts To delete an email account: 1. Click "Delete" to the right of the email account.
2. Click the "Delete" button to confirm that you would like to delete this email account.
Note: This will delete all of the emails associated with this email account. Change quota of an email account 1. Click "Change Quota" to the right of the email account. 2. Enter the new quota for the email account. 27
3. Click the "Change Quota" button to confim the new quota.
Change the password of an email account 1. Click "Change Password" to the right of the email account.
2. Enter the new Password for the email account. 3. Click the "Change Password" button to change the password for the email account.
1. Click the [Module] tab. Module refers to the Leads, Contacts, Accounts, etc. tabs. 2. In the [Module] Home page, select the record from the List View. 3. In the Record Details page, go to Emails Related List and click Send Mail.
4. In the Compose Mail page, enter the email message, attach files, and specify additional email addresses in CC & BCC fields. 5. Click Send. The email will be sent to the recipients with a copy of the mail stored under Emails Related List, in the sent folder of Zoho Mail and your configured mail client. See Also Attachment Limit 28
Through the Emails Tab 1. Click the Emails tab. 2. Click Compose from the left panel. The attachment limit while sending emails using Zoho Mail Add-on is 10MB. (Applicable in any Edition) See Also Attachment Limit The rest is the regular Email process. The compose window is similar to any mail compose editor with its set of editing and formatting options. If you have configured your outbox, then the mails will be sent after an interval of few minutes.
Through Gmail Account With just a few simple steps in the settings you can send mails from your Gmail account and view them as sent items in Zoho Mail as well as in Zoho CRM. To get this option working for your Gmail account, configure the Zoho Mail filter for Gmail POP account: 1. Log in to Zoho Mail, click Settings > Mail Organization > Filters > Add Filter. 2. In the Filters page, do the following: o Add a Filter Name. o For the message criteria, select Sender Is with your Gmail account (
[email protected]). o In the Move to Folder option, browse and select Sent. o Click Save.
29
Practical No.- 6 30
Aim: Microsoft Word 1. To familiarize with parts of Word window 2. To create and save a document 3. To set page settings, create headers and footers 4. To edit a document and resave it 5. To use copy, cut and paste features 6. To use various formatting features such as bold face, italicize, underline, subscript, superscript, line spacing, etc. 7. To use spelling and grammar checking feature 8. To preview print a document Open a new document and start typing 1. Click the File tab.
2.
Click New. 3. Double-click Blank document.
Start a document from a template The Templates site on Office.com provides templates for many types of documents, including resumés, cover letters, business plans, business cards, and APA-style papers. 1. Click the File tab. Click New. 2. Under Available Templates, do one of the following: Click Sample Templates to select a template that is available on your computer. Click one of the links under Office.com. Note To download a template that is listed under Office.com, you must be connected to the Internet. 3. Double-click the template that you want. Save and reuse templates If you make changes to a template that you download, you can save it on your computer and use it again. It's easy to find all your customized templates by clicking My templates in the New Document dialog box. To save a template in the My templates folder, do the following: 1. Click the File tab. 2. Click Save As. 3. In the Save As dialog box, click Templates. 4. In the Save as type list, select Word Template. 5. Type a name for the template in the File name box, and then click Save. Delete a document 1. Click the File tab. 2. Click Open. 31
3. 4.
Locate the file that you want to delete. Right-click the file, and then click Delete on the shortcut menu.
Each tab has several groups of commands that show related items together. On the Home tab, look for the Font group. In that group you’ll see several buttons and commands that perform a specific action on your document. For example the Bold button makes the text becomes bold. You can also change the font color and size of text with the Font Color button and Font Size button . Cutting text There are a number of ways to cut text, and you'll learn three techniques in this part: using the menu, using the right click menus, and using the keyboard. We're now going to chop out the unnecessary bits from the letter you downloaded above.The first thing to cut out is the double use of "Dear" in the first line. To cut text, use one of the following techniques: Technique 1 - Menu Cutting Highlight the text you want to cut. In the image below, the word "Dear" is highlighted. This is the word we want to cut:
From the menu bar, click Edit > Cut
Your highlighted text has gone: 32
Technique 2 - Right Click Cutting Highlight the text you want to cut:
Click on the highlighted text with the right mouse button to get the pop up menu
Choose "Delete Repeated Word", by clicking it with the left mouse button Technique 3 - Keyboard Cutting 1. Highlight the word or words you want to cut 2. Hold down the Ctrl key on your keyboard 3. Keep the Ctrl key held down 4. Press the letter “X” on your keyboard 5. Your highlighted text is cut from your document Again, we need to highlight the text that we're going to change. We'll turn part of the text to italics. So highlight the following line 6. "Does not include Mr Irate's alleged theft from his sweet shop" 7. When you have highlighted the text, click the italic icon in the tool bar. The icon will look like this after you have clicked the letter "I".
8. 9. Another way to turn text to italics is to hold down the Ctrl key on your keyboard. With the Ctrl key held down, press the letter "I" on your keyboard. 10. To underline some text, click the letter "U" of the shown icons. The keyboard shortcut is Ctrl plus the letter "U". Microsoft Word provides a decent Spelling and Grammar Checker which enables you to search for and correct all spelling and grammar mistakes in your document. Word is intelligent enough to identify misspelled or misused, as well as grammar errors and underlines them as follows. A red underline beneath spelling errors. A green underline beneath grammar errors. A blue line under correctly spelled but misused words. Check Spelling and Grammar using Review tab: Here is the simple procedure to find out wrong spelling mistakes and fixing them: Step (1): Click the Review tab and then click Spelling & Grammar button.
33
Step (2): A Spelling and Grammar dialog box will appear and will display wrong spellings or grammar and correct suggestions as shown below:
34
Now you have following options to fix the spelling mistake: Ignore: If you are willing to ignore a word then click this button and word ignores the word throughout the document. Ignore All: Like Ignore, but ignores all occurrences of the same misspelling, not just this one. Add to Dictionary: Choose Add to Dictionary to add the word to the Word spelling dictionary. Change: This will change the wrong word using the suggested correct word. Change All: Like Change, but change all occurrences of the same misspelling, not just this one. AutoCorrect: If you select a suggestion, Word creates an AutoCorrect entry that automatically corrects this spelling error from now on. Following are the different options in case you have grammatical mistake: Next Sentence: You can click Next Sentence to direct the grammar checker to skip ahead to the next sentence. Explain: The grammar checker displays a description of the rule that caused the sentence to be flagged as a possible error. Options: This will open the Word Options dialog box to allow you to change the behaviour of the grammar checker or spelling options. Undo: This will undo the last grammar changed. Step (3): Select one of the given suggestions you want to use and click Change option to fix the spelling or grammar mistake and repeat the step to fix all the spelling or grammar mistake. Step (4): Word displays a dialog box when it finishes checking for spelling and grammar mistakes, finally Click OK. 35
Check Spelling and Grammar using Right Click: If you will click a right mouse button over a misspelled word then it would show you correct suggestions and above mentioned options to fix the spelling or grammar mistake. Friday, October 14, 2011
Practical No.-7 36
Aim: Microsoft Word continued 1. To create a table with specified rows and columns 2. To enter data in a table 3. To select a table, a row, a column or a cell 4. To inset new row and/or a column 5. To delete a row and/or a column 6. To split and merge a row, column or a cell Tables can be quite fiddly to set up and format. But they are very good for presenting figures and statistics. We're going to design three tables. We'll see how to set up the first one now. When it's finished it will look like this:
As you can see, not many tourists wander into the vilage. I think the people of Evercrease like it that way! To set up your first table, then, do the following: Start a new Word document From the menu bar, click on Table From the menu that drops down, click Insert A sub menu appears From the sub menu, click Table
When you click Insert > Table you get a dialogue box popping up. This one below:
37
The table we're going to draw has 8 columns and 2 rows. So change the Number of columns to 8. Then click the OK button. Microsoft Word is a behemoth of formatting options only fully understood by a select few… for the rest of us it’s just plain confusing and often frustrating to deal with. I noticed a neat trick for selecting columns and felt the need to share it with everybody else. First you’ll need a document with a table, of course. This tip is most useful if you’ve got a really huge table that spans multiple pages. Instead of scrolling all the way to the top, you can just: Hold down the Shift key, and then use the Right mouse button anywhere within the column.
Add a cell 2. Click in a cell that is to the right of or above where you want to insert a cell. 3. Under Table Tools, on the Layout tab, click the Rows & Columns Dialog Box Launcher. 4. Click one of the following options. Click To Insert a cell and move all other cells in that row to the right. Shift cells right Note Word does not insert a new column. This may result in a row that has more cells than the other rows. Shift cells Insert a cell and move the existing cells down one row. A new row is added at down the bottom of the table. Insert entire Insert a row above the cell that you clicked in. row 38
Insert entire column
Insert a column to the left of the cell that you clicked in.
Add a column to the left or right 4. Click in a cell to the left or right of where you want to add a column. 5. Under Table Tools, on the Layout tab, do one of the following: To add a column to the left of the cell, click Insert Left in the Rows and Columns group. To add a column to the right of the cell, click Insert Right in the Rows and Columns group. About the Table Tools contextual tabs You will need to know where the Design and Layout Table Tools contextual tabs are when working on the design and structural layout of a table. The Design and Layout tabs are only visible after you have clicked inside of a table, and appear at the top of the screen on the ribbon. How to Add and Delete Cells, Columns, and Rows in a Word 2007 Table By Dan Gookin from Word 2007 For Dummies You can add and delete cells, columns, and rows in your Word 2007 tables. Word makes this easy by offering various commands in the Rows & Columns group of the Table Tools Layout tab.
Deleting cells, columns, or rows in a Word 2007 table The key to deleting part of a table is to first position the insertion pointer in the part of the table you want to remove. Then use the Delete button's drop-down menu to choose the table element you want to remove (this button is located in the Rows & Columns group of the Layout tab).
The table's contents are also deleted when you delete parts of a table.
39
The Delete Cells command displays a dialog box asking what to do with the other cells in
the row or column: move them up or to the left. Keep in mind that deleting a cell may make your table asymmetrical. Inserting rows or columns in a Word 2007 table You can expand a table by adding rows or columns; the rows or columns can be added inside the table or appended to any of the table's four sides. Merge cells You can combine two or more table cells located in the same row or column into a single cell. For example, you can merge several cells horizontally to create a table heading that spans several columns. 6. Select the cells that you want to merge by clicking the left edge of a cell and then dragging across the other cells that you want. 7. Under Table Tools, on the Layout tab, in the Merge group, click Merge Cells. Split cells 5. Click in a cell, or select multiple cells that you want to split. 6. Under Table Tools, on the Layout tab, in the Merge group, click Split Cells. 2. Enter the number of columns or rows that you want to split the selected cells into. For more information on using Table Tools, watch the Use Table Tools in Word 2007 demo. For more information on merging and splitting cells, watch the Merge and split table cells in Word 2007 demo. Note To split one table into two tables, you must do the following: 4. Select the row that you want to be the first row of the second table. 5. Under Table Tools, on the Layout tab, in the Merge group, click Split Table.
Practical No.- 8 40
Aim: Microsoft Excel 1. To familiarize with parts of Excel window 2. To create and save a workbook with single and/or multiple worksheets 3. To edit and format text as well numbers 4. To apply operations on range of cells using built-in formulae 5. To preview and print a worksheet Excel is an Electronic Spreadsheet Program Excel is an electronic spreadsheet program that can be used for storing, organizing and manipulating data. When you look at the Excel screen (refer to the example on this page) you see a rectangular table or grid of rows and columns. The horizontal rows are identified by numbers (1,2,3) and the vertical columns with letters of the alphabet (A,B,C). For columns beyond 26, columns are identified by two or more letters such as AA, AB, AC. The intersection point between a column and a row is a small rectangular box known as a cell. A cell is the basic unit for storing data in the spreadsheet. Because an Excel spreadsheet contains thousands of these cells, each is given a cell reference or address to identify it.
Starting EXCEL Before we go into any detail at all we need to know how to Start Excel. Starting Excel is no different to Starting any other Microsoft applications (Word, PowerPoint, Publisher, Access etc. ) and can be done in any number of ways. The three most common ways to Start Excel are:
From the Microsoft Office Toolbar
From a shortcut icon on your desktop 41
By selecting the Start button located at the bottom left hand side of your screen, then selecting Programs then Microsoft Excel.
When you Start Excel you should first see a blue bar at the very top of your screen. This is called the Title Bar. The title bar is where you will see the name of your Workbook once you have saved it. (Note that if you have not yet saved a Workbook, the default will probably be Book1). As you are familiar with Windows, you will notice to the right of the Title Bar the Minimize (hyphen), Restore (two squares) and Close (X) buttons. SAVING WORKBOOKS There are many formats that we can save our data in Excel as, but by far the most common is the default *. xls. (The asterisk represents your chosen file name). Some of the other popular formats are the *. xlt (Template) *. txt (Tab delimited), *. xml (Extensible Markup Language - available in newer versions only) and *. web page (obviously a web page). To see what we mean go to File>Save As. . . and Excel will display the Save As dialog box (dialog boxes will be discussed later). This is where you initially give your Workbook a name (File name:), nominate a file type (Save as type:) and a location (Save in:). We say "initially" as once you have saved a Workbook for the first time it will, by default, always save as that File name, type and location you have nominated each time you save.
Go to File>Save
Push Ctrl + S
Click the floppy disk icon on the Standard toolbar (discussed below)
Go to File>Save As. . . .
If we close a Workbook that we have made changes to, Excel will ask us (via a message box) if we wish to save the changes we have made. If we close a Workbook without making any
42
changes, no message will appear and Excel will close without saving. We will look at closing a Workbook below. CREATING MORE NEW WORKBOOKS Worksheets Adding new Worksheets to a Workbook can be done in a number of ways. The most common are:
Go to Insert>Worksheet
Right click on another Sheet name tab and select Insert and then select Worksheet.
There is another way that is not exactly inserting a new Worksheet, but rather making a copy of an existing Worksheet. To do this, select the Sheet you want to copy then left click on the name tab and holding down the Ctrl key (bottom left hand side of your keyboard), then drag it to one side, then release. This is a great time saver when you have spent hours setting up a Worksheet with all the formatting you want. You will notice that Excel will place a number after the copied sheets name in brackets. This is because we cannot have two Worksheets of the same name in the same Workbook. Name and Renaming Worksheets is covered later. Deleting Worksheets The logical opposite to inserting Worksheets is Deleting them. This can be done in any of the following ways.
Right click on the Worksheets name tab and select Delete
Go to Edit>Delete. . . . . the Delete dialogue box will appear with options, select your option and click OK to verify your request.
Whichever method we use, Excel will display a warning message letting us know that the deletion cannot be undone. This is not technically true as we could always close our Workbook WITHOUT saving and then re-open the Workbook, but of course this means we would loose any other changes we had made. Naming Worksheets 43
We can also name our Worksheets with meaningful names (which is a good idea!). The only restrictions we have with Worksheet names is:
They cannot exceed 31 characters.
They cannot contain the following characters: \ / ? * [ ].
The name cannot be the same as another Worksheet in the Workbook.
While it is not totally necessary, try to AVOID using spaces between words. For example, if you wanted to name a Worksheet Bills Hours use BillsHours instead! The reason for this is that some of Excels formulas have slight problems when they reference Worksheets that contain spaces. To name a Worksheet we can do so with any of the most methods below:
Double click the Worksheet Name tab. This will allow you to now type the name. Once finished, push Enter or click any cell.
Right click on the Worksheet Name tab and select Rename from the shortcut menu. Then type the name and hit Enter or click somewhere else on your Worksheet.
Go to Format>Sheet>Rename type the chosen name and hit Enter or click somewhere else on your Worksheet.
Moving Worksheets At times we may need or wish to move a Worksheet to another position in the Workbook or even to another Workbook. We have already looked at how we can make a copy of a Worksheet, select the Sheet you want to copy then left click on the name tab and holding down the Ctrl key drag it to one side, then release. If we do not want to copy but rather move the entire Worksheet to another position in the Workbook we can simply left click the Worksheet Name tab, then holding down the mouse button drag it to it's new position and release. The other method is to use the Move or the Copy dialogue box. This can be accessed in two ways. 44
Right click on the Worksheet Name tab and select Move or Copy
Go to Edit>Move or Copy Sheet…
It makes no difference which method you use! You will see on this dialogue box a To book: box with a small drop arrow to the right. The selection in this box will determine where our sheet will be moved or copied to. The default name in this box will be the active Workbook name (the current Workbook we are in). There will also always be another choice, if we click the drop arrow. This is (new book), if we choose this option Excel will automatically create a new Workbook for the sheet to be moved or copied to. Within this box will also be the names of any other open Workbooks, should there be any. Directly below the To book: box is the Before sheet: box. Our selection in this box will decide which position our sheet will be moved or copied to. Last of all is the Create a copy checkbox. If we check this box Excel will create a copy of our moved Worksheet. In other words our original sheet will remain where it is and a copy of it will be moved to our chosen location. If we leave it unchecked (which is the default) the Worksheet will be moved and not copied. The best way (as with most of excel) is to jump straight in and try out different options - you cannot do any harm! INSERTING ROWS, COLUMNS AND CELLS When working in Excel, there are times that you may need to insert an entire new row, an entire new column or only a single cell. Although the term Inserting gives the impression that you are actually adding another row, column or cell, you are in fact NOT. You may remember that in the first lesson we mentioned the fact that Excel has 256 columns, 65,536 rows and 1,677,216 cells per worksheet. These numbers are fixed, so technically we cannot add more. What we can do, however, is move a particular row down, column across, cell in. This can seem confusing, so it is probably best that we do a practical example so you can see how it works. 45
In cell A1 type any data. In cell A2 also type any data.
Select cell A2 right click, and select Insert.
You will notice that the Insert dialogue box will be displayed giving you four options.
Shift Cells Right
Shift Cells Down
Entire Row
Entire Column
For this exercise, lets select Shift Cells Right, then click OK. You will notice that the contents of cell A2 has now been moved to cell B2. Lets now select cell B2, right click, select Insert and select Shift Cells Down. The contents of cell B2 should now appear in cell B3. Now select any cell in row 1, right click, select Insert then Entire row, click OK. You should have an entire new empty row for row 1. Lets now insert an entire column. Select any cell in column B, right click and select Insert, then Entire Column and click OK. You should now have an entire new empty column for column B. When we insert rows, columns or cells in this manner (that is with a single cell selected) Excel will always display the Insert dialogue box, allowing us to make our choice. The same Insert dialogue box is available by selecting Insert on the Worksheet menu bar and then your required option (cells, rows, columns) EXCEL AUTOSUM FUNCTION/FORMULA The Excel AutoSum simply makes using the SUM function even easier, but only under the right conditions. Basically what the AutoSum will do is sum a range that is visibly directly above or to the left of the cell that we use it in (the default is above). It will include all of the visible range until the first blank cell or the first cell containing text. Try these examples. 46
On a clean Worksheet put any numbers in the range D5:D10 and F5:J5.
Select cell D15 and click the AutoSum icon on the Standard toolbar. It's the icon on the right of the globe that looks like a reversed Z.
You should get the formula =SUM(D5:D14). Notice it Start s at cell D5. This is because D4 is the first blank cell. It includes the empty range D11:D14 because it assumes we will want to add numbers within this range at some stage. Now try this;
Delete the AutoSum in cell D15 then scroll down until cell D10 is no longer visible. In other words row 11 should be our first visible row.
Select cell D12 and click the AutoSum icon
You should see: =SUM() in cell D12. Push Enter and you will get an error message.
Push Esc twice to cancel the operation.
The reason the AutoSum did not work is because there were no visible cells containing numbers above or to the left. Try a similar exercise on the numbers in cells F5:J5 and the same thing will happen. Although we could not enter the AutoSum in the second example, it did write the =SUM() formula for us and place the mouse insertion point between the opening and closing parenthesis. This means we could simply select any range that we wanted to sum. Print a partial or entire worksheet or workbook Do one of the following: To print a partial worksheet, click the worksheet, and then select the range of data that you want to print. To print the entire worksheet, click the worksheet to activate it. To print a workbook, click any of its worksheets. Keyboard shortcut You can also press CTRL+P. Under Print what, select an option to print the selection, the active sheet or sheets, or the entire workbook.
47
Practical No.- 9 Aim: Microsoft Excel continued 1. To insert new row and/or column in a worksheet 2. To delete a row and/or column in a worksheet 3. To create a variety of charts 4. To import and export data to or from worksheet INSERTING ROWS, COLUMNS AND CELLS When working in Excel, there are times that you may need to insert an entire new row, an entire new column or only a single cell. Although the term Inserting gives the impression that you are actually adding another row, column or cell, you are in fact NOT. You may remember that in the first lesson we mentioned the fact that Excel has 256 columns, 65,536 rows and 1,677,216 cells 48
per worksheet. These numbers are fixed, so technically we cannot add more. What we can do, however, is move a particular row down, column across, cell in. This can seem confusing, so it is probably best that we do a practical example so you can see how it works.
In cell A1 type any data. In cell A2 also type any data.
Select cell A2 right click, and select Insert.
You will notice that the Insert dialogue box will be displayed giving you four options.
Shift Cells Right
Shift Cells Down
Entire Row
Entire Column
For this exercise, lets select Shift Cells Right, then click OK. You will notice that the contents of cell A2 has now been moved to cell B2. Lets now select cell B2, right click, select Insert and select Shift Cells Down. The contents of cell B2 should now appear in cell B3. Now select any cell in row 1, right click, select Insert then Entire row, click OK. You should have an entire new empty row for row 1. Lets now insert an entire column. Select any cell in column B, right click and select Insert, then Entire Column and click OK. You should now have an entire new empty column for column B. When we insert rows, columns or cells in this manner (that is with a single cell selected) Excel will always display the Insert dialogue box, allowing us to make our choice. The same Insert dialogue box is available by selecting Insert on the Worksheet menu bar and then your required option (cells, rows, columns) We can, however, bypass this dialogue box and insert either an entire row or column by default. To insert an entire row by default, select any row number (the row number on the left in the 49
shaded area) so that the entire row is highlighted. Then right click and select Insert. You will notice that Excel makes an educated guess that you are after an entire row as it is an entire row that you have highlighted. The exact same thing would happen if we had an entire column highlighted, ie; an entire column would be inserted. If we want to insert more than one cell, row or column at a time, we simply select the appropriate number of rows, cells or columns before using Insert either via the menu option or the right click Shortcut menu. For example, if you select four entire rows, then right clicked and selected Insert, you would be inserting four new empty rows. CHARTING THE BASIC SPREADSHEET In this day and age charts are widely used in business to represent data in another way apart from just digits in a Worksheet. Charts can add color and style to a presentation and allow the reader to easily identify the trends and patterns that you may wish to relay. Charts can be created in a number of ways, but if you have never created a chart before, the Chart Wizard within Excel is probably the best way to Start . It will walk you through the process of setting up a chart prompting you for the information that you need to complete the process. Once you have created your chart, it can very easily be modified to suit your particular taste or needs. The data we will use for our chart is as described in the Previous Lesson . OK, now we are ready to create our chart. We will only create a basic chart in this lesson, as we go into much more detail during the Excel – Level 2 training course. Creating a simple chart is easily done by following these steps.
We should firstly save our file we created in the previous lesson , so let’s do that now and save it as Charting. xls.
Highlight the range A2:M7.
50
Select the Chart Wizard icon (the one with the blue, yellow and red bars on the Standard Toolbar.
The Chart Wizard dialog box should pop up in front of you and you should be on Step 1 of 4. Notice here the different categories of charts available to you under the heading Chart Type: to the left of the dialog box. To the right of the dialog box are the different chart sub-types. If you wanted a preview of how your data would look in different types of charts, click on the particular chart that you like and click the button Press and Hold to View Sample with your left mouse button. This will give you a basic preview of how your data will look if that particular type of chart were selected.
We are actually going to select Column under Chart Type: and we want to have the first sub-type selected under Chart Sub Type:
Select the Next button to move on to Step 2 of 4 of the Chart Wizard.
You should have the Data Range sheet tab in front of you. We need to make sure that Rows are selected under Series In:
Select the Next button to take you to Step 3 of 4 of the Chart Wizard.
Step 3 is where you would put in a title to your Chart, so let’s type CY2004 Income in the Chart Title box.
Under Category (x) Axis type the word Months. Your X axis is defined as the horizontal axis at the bottom of a chart.
Under Category (y) Axis type the word Dollars. Your Y axis is defined as the vertical axis to either the left or right (or both) or your chart.
We don’t need to make any further changes in our simple chart, so lets select the Next button to move on to the final step of the Chart Wizard dialog box. 51
In Step 4 of 4 of the Chart Wizard you have two choices. You can select either As a New Sheet, which will place your graph on a new Worksheet and call it Chart1 (you may change this name if you wish), or you can select As an Object In which will place your graph over your data as an object that you can move to its desired location. We are going to select As a New Sheet and Type CY2004 Income where it currently says Chart1.
Click Finish.
Your chart should be produced on a separate Worksheet called CY2004 Income. They really are very easy to create and just as easily they can be modified. One thing of great importance to note with charts is that if you change your source data, your chart will update to reflect these changes. If you wish to modify any part of a chart, you need to select that particular part, then double click to see the options available to you in the particular area that you have selected. For example if you double click on the maroon bars, you will see the option Format Data Series where you can change the color of your bars, Chart Type where you can change the type of chart you have selected, ie from a bar chart to a pie chart, Source Data which is where, if you wanted, you could change your source data. Add Trendline which obviously will give you a trendline, and Clear which when selected will delete the particular series you have highlighted. Let’s have a look at creating a simple pie chart from non-contiguous data (data not joined together) now. This is done in much the same way as charting from contiguous data. Let’s chart the Total Income for the year by Department
Click in cell N2.
Type the word Total.
Click in cell N3 and select the AutoSum icon from the Standard toolbar, then select Enter.
Click back in cell N3 and then using the Fill handle, fill down to cell N7. 52
Format the Total column so that its formatting is the same as the rest of the table.
Click in cell A3 and select the range A3:A6.
Holding down your Ctrl key, select the range N3:N6.
Select the Chart Wizard icon from your Standard Toolbar.
Select Pie under Chart Type and select the second pie chart under Chart Sub-type.
Click the Next button to take you through the Wizard to step 2.
No changes to make here, so lets select the Next button to move on to step 3.
Under Chart Title type in the heading CY2004 Income by Department.
Select the Next button to take you to the 4th and final step of the Chart Wizard.
Let’s select As an Object In, then select Finish.
Save your Workbook.
You now have a pie chart embedded in your data as an object. This chart can be moved or sized easily. If you wish to move an object, click inside the object (in this case a pie chart) so that it becomes active. You will know it is active when you see 8 handles (squares or circles depending on which version you are using) around the edge of the pie chart. If you then hold your left mouse button down until your mouse pointer changes to a cross with four arrow heads, you can move your pie chart to it’s desired location. You can also change the size of it easily, by selecting any of the 8 handles around the outside of your object until your mouse changes to a double headed arrow, then drag in the desired direction. Note here that if you select a corner handle, your object will be sized relatively, in other words the width will change relative to the height and vice versa as you drag. Pie charts can be modified in exactly the same way as all other charts, by double clicking to select the part of the chart you wish to modify. Note as with all other charts, if you make a change to your source data, your pie chart will update to reflect the changes. 53
Excel® import and export Stata for Windows, Mac*, and Linux can now directly import and export Microsoft Excel files. Both Excel 1997/2003 (.xls) files and Excel 2007/2010 (.xlsx) files are supported.
Above you see the preview tool, which you can use to see the data in an Excel worksheet before importing it and adjust options controlling how the data are imported. import excel features .xls and .xlsx support import any worksheet from a workbook with multiple worksheets import a custom cell range treat first row of Excel data as Stata variable names automatic conversion of Excel dates to Stata dates automatic optimization of Stata storage types
54
Practical No.- 10 Aim: Microsoft PowerPoint 1. To familiarize with parts of PowerPoint window 2. To create and save a new presentation 3. To apply design templates to a presentation 4. To insert, edit and delete a slide 5. To use different views of slides 6. To use slide show from beginning or from the current slide 7. To preview and print a presentation Parts of the PowerPoint screen: Title bar - displays the document name Menu bar - click on a menu option to see a list of commands Standard toolbar - frequently used menu options Formatting toolbar - displays formatting commands Placeholder - click or double-click to add an element to a slide Outline view button - displays document in outline form Slide view button - displays slides one at a time Slide Sorter view button - displays all slides in a single screen Slide show button - displays slide show Drawing toolbar - displays drawing tools Status bar - shows the current page number and position of the insertion point in the document Office Assistant - quick help when you need it
55
It does not matter which version of PowerPoint you are using, a screen will appear that asks you to choose a starting scheme. This scheme will either do much of the work for you or allow you total control of the layout of your slides. The three choices are laid out below, next to the image that appears in PowerPoint 2000. Earlier versions, as well as the Macintosh versions, will show images that are very similar to the one shown. You will decide to create a new PowerPoint presentation using one of the three options. Auto Content Wizard This tool "gets you started by providing ideas and and organization for you presentation." This tool works wonderfully for business applications as most of the templates it allows are business related. Not recommended for the first time user. Design Template This tool will provide you with a number of very attractive templates. You will be able to choose the backgrounds of the pages you will create instead of worrying about creating these images yourself. Your layout options will be the same as 56
if you were using a Blank Presentation (see below). This option is nice for first time users because it allows you to worry about content and let the aesthetics take care of themselves. Blank Presentation This option is for the advanced user. Everything is user-controlled and up to the creator of the presentation. This allows for total creativity on the part of the presenter. Once you have selected a slide, click Home > Slides > New Slide. You'll notice that the New Slide button is in two halves.
If you click the top half of the New Slide button, the default Title and Content type slide will be added. If, instead, you click the bottom half of the button, you will be able to select what type of slide is added.
57
Once the new slide has been added, you can click into one of the editable content boxes to make your changes. Now that you've learned how to add slides to a presentation, the time has come to learn how to delete unwanted slides. Deleting slides can be performed in three ways. Select the slide and then Press the delete key on the keyboard Pres the backspace key on the keyboard Right click on the slide and select Delete Slide Electric Teacher is your one stop shop for Microsoft Office Tutorials. It's nearly three years since Office 2007 was released and Microsoft tell us that Office 2010 is just around the corner. Rumour has it that we should see it released mid way through 2010.
Practical No.- 11 Aim: Microsoft PowerPoint continued: 1. To check spellings in a presentation 2. To add clip art and pictures in a slide 3. To add chart, diagram and table in a slide 4. To set animation for a selected slide and/or for entire presentation 5. To create slide master and title master 6. To create a custom show Check spellings in a presentation 1.Open the Review tab on the Ribbon and then click the Spelling button found in the Proofing. If PowerPoint finds a spelling error in your presentation, it switches to the slide that contains the error, highlights the word, and displays the misspelled word along with a suggested correction. 58
If PowerPoint can’t come up with a suggestion or if none of its suggestions are correct, type your own correction and click the Change button. 2 . Choose the correct spelling and click the Change button. If you want to use a misspelled word, click the Ignore button. If you want PowerPoint to ignore all occurrences of a particular misspelling, click the Ignore All button. 3.Repeat Steps 1 and 2 until PowerPoint tells you the spelling check is complete. Note that PowerPoint doesn’t check the spelling in embedded objects, such as charts or graphs. PowerPoint’s spell checker also can’t tell the difference between your and you’re, ours and hours, angel and angle, and so on. If the word is in the dictionary, PowerPoint passes it by. PowerPoint spell checker is no substitute for good, old-fashioned proofreading. Insert clip art Do the following for all programs listed in the Applies To at the top of the article. 8. On the Insert tab, in the Illustrations group, click Clip Art. 7. In the Clip Art task pane (task pane: A window within an Office program that provides commonly used commands. Its location and small size allow you to use these commands while still working on your files.), in the Search for text box, type a word or phrase that describes the clip art that you want, or type all or some of the file name of the clip art. 8. To narrow your search, do one or both of the following: To limit the search results to a specific collection of clip art, in the Search in list, select the check box next to each collection that you want to search. For more information about collections, see About Clip Organizer collections. To limit the search results to clip art, in the Results should be list, select the Clip Art check box. You can also select the check boxes next to Photographs, Movies, and Sounds to search those media types. 9. Click Go. 10. In the list of results, click the clip art to insert it. Creating a Table 1. In the body of the slide, double-click the button on top of the Double Click To Add Table line 2. In the Insert Table dialog box, change the Number of Columns spin button to 3 and change the Number of Rows to 4
59
3. Click OK If the Mouse cursor appears with the Draw Table tool, on the Tables and Borders toolbar, click the Draw Table button to dismiss the tool 4. Click the middle top cell in the table 5. Type 2002 and press Tab 6. Type 2003 7. To add another column to the right side of the 2003 column, while the caret is in that column, on the Tables and Borders toolbar, click the Table button and click Insert Column To The Right 8. Click 2003 and press Tab 9. In the new top empty cell, type 2004 and press Tab 10. Complete the table. Formatting a Chart 1. On the slide, double-click the chart 2. Click the cell under Advertising, type Equipment and press Tab, complete the datasheet as follows:
3. Click somewhere on the slide to close the datasheet Formatting a Chart's Shapes 1. To format the chart, double-click it 2. Right-click the most right (green) box and click Format Data Series... 3. In the Patterns property page of the Format Data Series dialog box, the Brown color (1st row - 2nd column) and click Fill Effects 4. In the Gradient property page of the Fill Effect dialog box, click the One Color radio button and move the slider slightly to the left 5. In the Shading Styles section, click the Vertical radio button
60
6. In the Variants section, click the button in the 2nd column - 2nd row
7. Click OK 8. Click OK 9. Right-click the legend box that is positioned to the right of the chart and click Format Legend... 10. In the Format Legend dialog box, click the Placement property page 11. Click Bottom and click OK 12. Right-click the white area in the chart and click Format Walls... 13. In the Format Walls dialog box, in the Area section, click Fill Effects 14. In the Fill Effects dialog box, click the Texture property page 15. In the Texture section, click the box in 2nd column - 2nd row 16. Click OK twice 17. Complete the chart as you see fit and click an empty area in the slide to see the result
Practical No.- 12 Write a program to find the nature of the roots as well as value of the roots. However, in case of imaginary roots, find the real part and imaginary part separately. #include
#include #include int main() { 61
clrscr(); float a,b,c,d,root1,root2; cout << "Enter the 3 coefficients a, b, c : " << endl; cin>>a>>b>>c; if(!a){ if(!b) cout << "Both a and b cannot be 0 in ax^2 + bx + c = 0" << "\n"; else { d=-c/b; cout << "The solution of the linear equation is : " << d << endl; } } else { d=b*b-4*a*c; if(d>0) root1=(-b+sqrt(d))/(2*a); root2=(-b-sqrt(d))/(2*a); cout << "The first root = " << root1 << endl; cout << "The second root = " << root2 << endl; } getch(); return 0; }
Practical No.- 13 Write a program, which takes two integer operands and one operator form user, performs the operation and then prints the result. (Consider the operators +,-,*, /, % and use switch statement).For example, the input should be in the form: 5 + 3 the output should comes Result = 8. #include #include void main() { 62
char n; clrscr(); printf(“Enter any arithmetic operator: “); scanf(“%c”,&n); switch(n) { case ‘+’: printf(“\nThe entered operator is of Addition”); break; case ‘-’: printf(“\nThe entered operator is of Subtraction”); break; case ‘*’: printf(“\nThe entered operator is of Multiplication”); break; case ‘/’: printf(“\nThe entered operator is of Division”); break; case ‘%’: printf(“\nThe entered operator is of Modulus Division”); break; default: printf(“It is not an arithmetic operator.\nYou have entered a wrong choice”); } getch(); }
Practical No.- 14 Fibonacci sequence is defined as follows: the first and second terms in the sequence are 0 and 1. Subsequent terms are found by adding the preceding two terms in the sequence. Write a program to generate the first n terms of the sequence. For example, for n = 8, the output should be 0 1 1 2 3 5 8. #include using namespace std; main() { int n, c, first = 0, second = 1, next; 63
cout << "Enter the number of terms of Fibonacci series you want" << endl; cin >> n; cout << "First " << n << " terms of Fibonacci series are :- " << endl; for ( c = 0 ; c < n ; c++ ) { if ( c <= 1 ) next = c; else { next = first + second; first = second; second = next; } cout << next << endl; } return 0; }
Practical No.- 15 Write a program to print all the prime numbers between m and n, where the value of m and n is supplied by the user.
64
Practical No.- 16 The number such as 1991, is a palindrome because it is same number when read forward or backward. Write a program to check whether the given number is palindrome or not. #include 65
using namespace std; int main() { int n, num, digit, rev = 0; cout << "Enter a positive number: "; cin >> num; n = num; do { digit = num%10; rev = (rev*10) + digit; num = num/10; }while (num!=0); cout << " The reverse of the number is: " << rev << endl; if (n = = rev) cout << " The number is a palindrome"; else cout << " The number is not a palindrome"; system("pause"); return 0; Getch(); }
Practical No.- 17 A positive integer number IJK is said to be well-ordered if I
#include #include using namespace std; bool desirable(int num, int N) { int digits[N]; for (int i=0; idigits[i+1]) continue; else return false; } return true; } int main() { printf("Enter: "); int N; scanf("%d",&N); int low = (int)pow(10.0, double(N-1)); int high = (int)pow(10.0, double(N)) -1; for (int i=low; i<=high; i++) { if(desirable(i,N)) printf("%d\n",i); } return 0; }
Practical No. - 18 Write a function to computer the highest common factor of integer numbers m and n. Use this function to find the highest common factor of integer numbers a and b. #include int main(){ 67
int n1,n2; printf("\nEnter two numbers:"); scanf("%d %d",&n1,&n2); while(n1!=n2){ if(n1>=n2-1) n1=n1-n2; else n2=n2-n1; } printf("\nGCD=%d",n1); return 0; }
Practical No.- 19 Given the marks (out of 100) obtained by each student in a test of a class with n students. Write a program to obtain the following information: (a) Minimum and maximum marks score (b) Average score of the class, and (c) Number of students whose score is greater than class's average score. 68
#include #include float average_marks(float []); float highest_marks(float []); float lowest_marks(float []); main() { clrscr(); float marks[10]={0}; cout<<"\n Enter the marks of the ten students : "<>marks[count_1]; } getch(); clrscr(); cout<<"\n ******************** Result Sheet ****************"<=50)?"Pass":"Fail")<
return sum/10; } /*************************************************************************///-------------------- highest_marks(float []) -----------------------///************************************************************* ************/float highest_marks(float marks[]) { float highest=marks[0]; for(int count=0;count<10;count++) { if(marks[count]>highest) highest=marks[count]; } return highest; } /*************************************************************************///--------------------- lowest_marks(float []) -----------------------///************************************************************* ************/float lowest_marks(float marks[]) { float lowest=marks[0]; for(int count=0;count<10;count++) { if(marks[count]
Practical No.- 20 Write a program to multiply matrix Am×n by Bp×q, given that n = p. #include int main() { int arr1[20][20],arr2[10][10]; 70
int result[20][20]; int m,n; int i,j; // prompts the user to enter the rows and columns of the matrix std::cout<<" Enter the number of rows (m) : "; std::cin>>m; std::cout<<" Enter the number of columns (n) : "; std::cin>>n; std::cout<<" \n Enter the elements of the 1st matrix \n "; for (i=0; i "; std::cin>>arr1[i][j]; } } std::cout<<"\n Enter the elements of the 2nd matrix : \n "; for (i=0; i "; std::cin>>arr2[i][j]; } } //------------ display matrics ----------------------std::cout<<"\n 1st matrix \n "; for (i=0; i
} std::cout<<"\n"; } std::cout<<" \n Resultatn matrix \n"; int k=0; // multiplies the two matrices together for(i=0;i< m;i++) { for(j=0;j< n;j++) { result[i][j] = 0; for(k=0;k< m;k++) { result[i][j] = result[i][j] + arr1[i][k] * arr2[k][j]; } } // end of j sub loop } // end of i main loop // displays the resultant matrix for (i=0; i
Practical No. 21 Write a program to sort a list of n integer numbers in descending order using bubble sort method. include #include 72
void bubbleSort(int *array,int length)//Bubble sort function { int i,j; for(i=0;i<10;i++) { for(j=0;jarray[j]) { int temp=array[i]; //swap array[i]=array[j]; array[j]=temp; } } } } void printElements(int *array,int length) //print array elements { int i=0; for(i=0;i<10;i++) cout<
Practical No.- 22 Create a class named Student with the appropriate data members and member functions to generate output comprising student's admission no., name, marks in five subjects and the %age of marks obtained. Write a program to use the Student class. #include #include 73
class student { int rollno; char name[10]; float per; public: void getdata() { char ch; //to clear buffer cout<<"\nEnter Roll No. : "; cin>>rollno; cout<<"Enter Name No. : "; cin.get(ch); cin.getline(name,10); cout<<"Enter % : "; cin>>per; } void putdata() { cout<<"Roll No. : "<>rno; for(x=0;x<5;x++) { if(s[x].getrollno()==rno) { s[x].putdata(); break; } } 74
if(x==5) cout<<"\nYour RollNo does not exists: "; getch(); }
Practical No.- 23 23. Create a class named ComplexNumber with the appropriate data members and constructors. Include member functions (defined inside the class) to perform the following operations: (a) Inputting a complex number (b) Outputting a complex number (c) Arithmetic operations on two complex numbers Write an appropriate program to demonstrate use of the Complex Number class. 75
#include using namespace std; class Complex { public: double r; double i; public: Complex(); void add(Complex, Complex); void subtract(Complex, Complex); void print(); }; Complex::Complex() { r = i = 0; } void Complex::add (Complex op1, Complex op2) { r = op1.r+op2.r; i = op1.i+op2.i; } void Complex::subtract (Complex op1, Complex op2) { r = op1.r-op2.r; i = op1.i-op2.i; } void Complex::print () { cout << r << i; } int main () { Complex operand1, operand2, result; cout << "Input real part for operand one: " << endl; cin >> operand1.r; 76
cout << "Input imaginary part for operand one: " << endl; cin >> operand1.i; cout << "Input real part for operand two: " << endl; cin >> operand2.r; cout << "Input imaginary part for operand two: " << endl; cin >> operand2.i; result.add(operand1, operand2); cout << "The sum is " << result.add << endl; result.subtract(operand1, operand2); cout << "The difference is " << result.subtract << endl; }
Practical No.- 24 Create a class named Height with feet and inches as its data members. Also include appropriate constructors (and destructor, if required). Include member functions (defined outside the class) to perform the following operations: (a) Inputting a height of a person (b) Displaying a height of a person (c) To get height in inches (d) To compare two heights Write an appropriate program to demonstrate use of the Height class. #include #include 77
class Distance { private: int feet; float inches; public: void setdist(int ft, float in) { feet=ft; inches=in; } Distance add(Distance); void disp(); }; Distance Distance::add(Distance D) { Distance t; t.inches=inches + D.inches; t.feet =0; if(t.inches>=12.0) { t.inches-=12.0; t.feet++; } t.feet +=feet + D.feet; return t; } void Distance::disp() { cout<
78