Skip to main content

Posts

OOPS/Perl Examples + Excercises

Exercise: Imagine the following situation. Software is to be written to handle information about the aircraft housed at a particular airport. There are various kinds of these aircraft and these fall into three categories: personal, elite and passenger. Personal and elite aircraft are privately owned and the airport keeps information about the owner’s name and contact details. Personal aircraft are never piloted by the airport’s pilots. Elite aircraft also have a V.I.P. associated with them. Elite aircraft are usually owned by companies but usually use the airport’s pilots. Passenger aircraft are owned by the airport and have a regular route with predetermined destinations and only use the airport’s pilots. All aircrafts have fuel quantities, hanger numbers, a maximum person carrying capacity as well as luggage and cargo, a maximum flying distance and several other values. 1. What classes can you identify in this description? 2. Draw these classes and their relations to each other. Can
Should we allow our staff to use social networking sites? Some people say they are dangerous but I can't see how. Can you explain the dangers? > EXPERT RESPONSE There's nothing wrong with using Facebook, other than the potential impact on working time, but that's not a security matter! The issue is in how your staff configures Facebook, and what information they place on it. A few tips to pass on to your staff: Don't allow anyone that isn't part of your network of 'friends' to see your profile. Don't allow non-friends to see your friends. Why? I could easily impersonate one of your friends, fake a new profile, and send you an invite. You accept, thinking a genuine friend has created a new profile, then I'm in your network of friends and can see your profile. Think about what information is in your profile. What would be useful in stealing your identity? Date of birth, address, email address, employer, interests. why does this type of information n

IE shortcuts

Ctrl + F Brings up the Find dialog box F5 Refreshes the page Ctrl + N Opens a new browser window Alt + Home Takes you to your homepage Escape Stops loading the current page Ctrl + A Selects the entire page F1

Windows shortcut keys

F2 Select a file and press F2 to rename the file F3 In Windows Explorer and on Desktop, pressing F3 brings up the Find dialog box Alt + Enter Select a file and press Alt + Enter to bring up its Properties dialog box Alt + Space bar Inside a window, press Alt + Spacebar to bring up the system menu of that window Ctrl + Escape Brings up the wi

some OOPS concepts and examples

The class is the description of the object and the object in an instance of the class. For example the class of humans would describe us as having the attributes such as arms, hands, legs and heads; and methods such as talk, think, eat, and sit. However each of us would be an instance of that class, an object. If I can jump it’s because humans can jump, if I can laugh, it’s because humans can laugh. That is, the class defines the methods and attributes for each object belonging to that class. POLYMORPHISM : Polymorphism is the ability for objects to respond differently to the same message, depending upon what type of object they are. For example, members from each of the following classes; Spouse, YoungerBrother, TotalStranger or LawEnforcementOfficer, are likely to behave differently when the hug method is called upon them. Polymorphism becomes very useful when we have a group of related objects upon which we want to perform an operation, but those objects may need to react in differe

Use of Hashes.

Hashes are an advanced form of array. One of the limitations of an array is that the information contained within it can be difficult to get to. For example, imagine that you have a list of people and their ages. The hash solves this problem very neatly by allowing us to access that @ages array not by an index, but by a scalar key. For example to use age of different people we can use thier names as key to define a hash. %ages = ('Martin' => 28, 'Sharon' => 35, 'Rikke' => 29,); print "Rikke is $ages{Rikke} years old\n"; This will produce following result Rikke is 29 years old

currency conversion ( yen to INR )

1 yen = 0.40 rupee Currency Conversion Results Symbol Indian Rupee Exchange Rate Japanese Yen Bid Ask INRJPY=X 1 Sep 5 2.3716 2.3716 2.3716 2.3724 Symbol Japanese Yen Exchange Rate Indian Rupee Bid Ask JPYINR=X 1 Sep 5 0.4205 0.4205 0.4205 0.4206