Free Essay

Interfaces

In:

Submitted By dwald
Words 738
Pages 3
Interfaces
The term interface is a general term, which is widely used in several different areas, not only in Computer Science. For example, a graphical user interface (GUI) is a series of screens with buttons, textboxes and other elements which you interact with when running an application such as Microsoft Word. We have seen the term interface used in a different context, during Week 2, where we talked about an interface of a class. Through the class interface you can specify the public attributes and behaviors of a class, which are presented to the user (client) of the class. This set of attributes and behaviors comprise the protocol by which objects communicate with each other. Now, I’m sure you will be content to hear that there is yet another definition of the word interface, as it applies to object-oriented development! There are several instances in object-oriented software development, where it is necessary to specify general behavior different classes should adhere to, without specifying any details of what the behavior is. Each of the classes is responsible for providing a particular definition of the behavior and it is mandatory that all specified general behaviors be explicitly defined by each involved class. For example, let’s imagine a company, where there are several guidelines, one of them being the dress code of the personnel. Each department should establish its own dress code policy. It doesn’t matter what the specific dress code policy is, as long as all departments have some dress code policy. One way this is enforced in object-oriented languages is through the use of interfaces. In C#, an interface resembles a class (it is not a class, we cannot instantiate objects of this type), which can only contain methods, properties, events, indexers, or any combination of these four member types. All members are automatically declared as public. Given our dress code example above, here is an example of the syntax. The keyword interface is used followed by the interface name. The body of the interface lies between opening and closing braces: interface ICompanyPolicies //the interface name usually begins with a capital ‘I’ { //method declarations (notice that no implementation is given) void DressCode(); } If a class chooses to conform to this interface, we say that a class implements the interface. To specify that a class implements an interface in C#, we use the following syntax. Note the colon after the class name followed by the interface name. The following code states that “the AccountingDept class implements interface ICompanyPolicies”: class AccountingDept : ICompanyPolicies { } All classes that implement an interface, must to provide implementation details for all interface components. So in our example, the AccountDept class needs to implement the interface method DressCode(). If the interface contained other methods as well, then the AccountDept class must provide an implementation for each and every one of them. class AccountingDept : ICompanyPolicies {

//Implementation of the Interface method DressCode() void DressCode() { Console.WriteLine(“Dark blue or gray suit with tie is required for men.“); Console.WriteLine(“Dark blue skirt with white shirt and red scarf is required for women.“); } } To access the method DressCode() of the AccountingDept class, you use an object of the class and the dot operator as you would to access any other method of the class, ex: AccountingDept myAccDept = new AccountingDept(); myAccDept.DressCode(); Similarly, if other classes in the above scenario, such as PublicRelationsDept, InformationTechnologyDept etc, choose to adhere to the specifications of this interface, they need to implement the ICompanyPolicies interface in a similar fashion. So as you might guess, an interface is a way to enforce structure in the classes that implement the interface. By knowing that a class implements the ICompanyPolicies interface, you are sure that it provides a method called DressCode(). Key points to note: • Interfaces are not classes. In particular, you can never use the new operator to instantiate the interface. ICompanyPolicies policy = new ICompanyPolicies(); //This is an ERROR • • However, you can declare a reference to an interface. ICompanyPolicies policy; //This is OK A reference to an interface, can refer to an object of a class which implements the interface. ICompanyPolicies policy; //This is OK since AccountingDept implements ICompanyPolicies policy = new AccountingDept();

Once we talk about inheritance next week and abstract classes during week 6, you will have a chance to compare what you learned about interfaces and detect similarities/differences as well as think about scenarios where one can be used over the other.

Similar Documents

Free Essay

The Human Computer Interface

...The Human Computer Interface By: Dustin Hudson March 4, 2014 CIS 106: Prof. Howell In today’s world, there are various types of technology that humans interact with on a day to day basis. Technology is an ever evolving industry that is constantly trying to meet the demands of its consumers. Whether you are trying to write a document in Microsoft Word, talking to your IPhone using Siri, or having your respiration rates being monitored by a machine at the doctor’s office, all of these technologies are designed to interact with humans. The science behind designing technologies to meet the needs of human interaction is known as the human-computer interface. The human-computer interface involves many different perspectives in order to be effective. Most companies assemble a team when trying to develop a software program. This team can include people from departments such as “marketing, engineering, and manufacturing to get different perspective” (G. Anderson, D. Ferro, and R. Hilton 2013). Some teams even include psychology majors in order to get perspectives on human behavior and human memory. Developing a sound software program is very important in order for it to be successful. It has to be not only technically sound and reliable, but it also must be visually appealing to the consumer and work hand in hand with that person’s memory storage. A person has three types of memory, sensory storage, short term memory and long term memory. “Sensory storage works as a buffer to...

Words: 1566 - Pages: 7

Free Essay

Designing User Interfaces

...What is user interface design? User interface design or user interface engineering is the design of computers, appliances, machines, mobile communication devices, software applications, and websites with the focus on the user's experience and interaction. The goal of user interface design is to make the user's interaction as simple and efficient as possible, in terms of accomplishing user goals—what is often called user-centered design. Good user interface design facilitates finishing the task at hand without drawing unnecessary attention to itself. Graphic design may be utilized to support its usability. The design process must balance technical functionality and visual elements (e.g., mental model) to create a system that is not only operational but also usable and adaptable to changing user needs. A user interface is the system by which people (users) interact with a machine. The user interface includes hardware (physical) and software (logical) components. User interfaces exist for various systems, and provide a means of Input, which allows the users to manipulate a system, and/or Output, which allows the system to indicate the effects of the users' manipulation. Generally, the goal of human-machine interaction engineering is to produce a user interface which makes it easy, efficient, and enjoyable to operate a machine in the way which produces the desired result. This generally means that the operator needs to provide minimal input to achieve the desired output, and also...

Words: 2479 - Pages: 10

Premium Essay

A Man-Machine Interface

...believed that they would be replaced by these thinking machines. The human beings mechanical mobility has evolved out of our spirits need to interact with the universe and the next step, the one that frees mankind from physical limitations will be the use of machines that will be ubiquitous, in effect, working as natural extensions of the body. The continuous innovations in electronics are making more and more components ubiquitous. The convergence of man and machine requires that computers become an integral part of the human body. The hurdles are many and those in opposition of such a world are afraid that these changes can only come about with the sacrifice of the soul. The last huddle that will stand in mans way of a true Man-Machine interface may well be one of posed by the threat that others may seek to control the machine portion and enslave mankind as mindless cyber-men. How did these fears of mechanical computers, these thinking machines, replacing Humans get started and fears founded in reason? Human computers have been used by government and business since the dawn of the man to calculate taxes and manage accounts. While working on calculating machines...

Words: 1361 - Pages: 6

Free Essay

Graphical User Interface Summary

...Graphical User Interface Systems An Object Oriented Approach to the Design of Graphical User Interface Systems Nowadays, the usage of personal computers, mobile devices and internet among the general population, so the importance of easy to learn user interfaces has risen in recent years. The development of Graphical Interface Systems becomes important. These systems will make easy to user activities and communication of particular systems. The first and main feature of User Interface System is that manages the communication between user and application. So in the process of developing these systems, the object oriented programming features and techniques will make the design characteristics of interface systems like interactivity, flexibility and usability. Applying object-oriented methodologies to UI design can help to achieve this goal. To develop user interfaces, first identify the task to particular program function translation. It also involves identifying the object, problem space and associated functions, objects and attributes for the system. The main purpose of using object oriented approach in designing user interfaces because object programming allows for reusability,modularity and data privatization. modern graphical user interfaces are object-oriented; the user first accesses the object of interest and then modifies it by operating upon it. There are several reasons for going with an object-oriented interface approach for graphical user interfaces. One is...

Words: 790 - Pages: 4

Premium Essay

User Interface- Extended Definition

...User Interface A User Interface (UI) refers to the component of a computer program through which humans and machines exchange data and instructions in order to complete a task (User Interfaces). The data and instructions can be exchanged through a growing number of mediums such as text or graphical stimuli. Computer scientists go to great lengths to design and implement UIs, as they are imperative to the efficacy of the program they create. Without a working UI the computer and user would not be able to communicate with one another, severely limiting the ability of both. For instance, consider how difficult it would be to make a phone call if your phone did not provide you with a contact list or dialing pad. You would still be able to call, but it would take a much deeper level of knowledge to accomplish one of the phone’s most basic functions TYPES OF UI A UI will generally fall into one of 3 categories: command line, menu driven, and graphical 1. Command Line The oldest and least common UI is the command line interface. The command line interface is comprised solely of text. This type UI will accept input almost exclusively through the keyboard and requires the user to be familiar with the commands it accepts since no implicit direction is given. For example, Figure 1 shows a command line UI of a grade calculating program. There is no information given to the user other than the text on screen. Command line UIs are the most resource efficient of the three types of UI...

Words: 561 - Pages: 3

Free Essay

Interface Design for Computer-Based Learning Environments

...[pic] [pic] Interface Design for Computer-based Learning Environments Marshall G. Jones Northern Illinois University Email: mgjones@niu.edu James R. Okey The University of Georgia [pic] Research in the area of user interface design for computer-based learning environments (Jones, 1993) found that screen and interface design should be considered at the same time during the design and development process. Additionally, the research produced a list of interface design concepts and a corresponding list of guidelines for implementing those concepts. The concepts presented in this paper are broad issues to be considered during the design and development process. The guidelines that are associaàted with the concepts are intended to be flexible, and allow for the creativity of the individual designer, and the needs of a particular project. Names for some of the concepts were taken from an analysis of the literature in computer-based instruction (CBI), computer-based learning environments, and human computer interaction (HCI). Names for the other concepts were emic categories generated by the participants in the study. The guidelines were derived through an analysis of the literature, an analysis of six commercially produced computer-based learning environments, and interviews with the designers and developers of the six computer-based learning environments. Further research is being conducted to determine how designers and developers can implement these guidelines. If you...

Words: 6044 - Pages: 25

Free Essay

The Evolution of Human Computer Interface and Beyond

...Human Computer Interface and Beyond Contents 1. Abstract 2 2. Introduction 3 3. Evolution of HCI 4 4. Important features and facts to ponder 5 4.1 Operating systems and their role in HCI 5 4.2 HCI in the making of a virtual reality 6 5. Glimpse towards the future of HCI 7 5.1 HCI for enhancing human life 7 5.2 Uses and Impacts of HCI 9 6. Conclusion 11 7. References 12 Abstract “HCI concept came into the spotlight after various researches; the improvement of GUIs paved the path for a better and advanced interaction between humans and computers. Interaction with computers has become so close; it almost devoured the human life styles. Future human life will be much dependent upon technology than ever before.” Introduction People live in a curious and modern world where they go to no lengths to embrace technology. It is people who pick and choose what to use more efficiently. HCI (Human Computer Interface) is one of the catalysts which revolutionised the computer technology to a greater extent during the past three decades. HCI concept came into the spotlight after various researches which had been done on various universities and other research labs mainly across USA. But HCI took the centre stage after the rapid growth of GUI (Graphical User Interface) s. HCI revolutionised...

Words: 1895 - Pages: 8

Free Essay

Interface

...Интерфейсы. Глава 1. ОБЩИЕ ПРИНЦИПЫ ОРГАНИЗАЦИИ ИНТЕРФЕЙСОВ ИНФОРМАЦИОННОВЫЧИСЛИТЕЛЬНЫХ СИСТЕМ 1.1. Общие понятия о информационно-вычислительных системах В основе любой научно-технической, биологической и социальной системы управления и функционирования, а тем более в основе систем вычислительной техники, лежат информационные процессы, связанные со сбором и обработкой информации, ее передачей, хранением, распределением, отображением, регистрацией, считыванием и т.д. Информация - понятие очень емкое и трудно поддающееся четкому определению. Не останавливаясь на сложной проблеме строгого формализованного и полного определения понятия информации, примем, что информация есть сведения о тех или иных явлениях или объектах (сущностях), точнее - сведения об определенных свойствах или параметрах этих явлений или объектов и зависимостях между этими свойствами. Информация воплощенная и зафиксированная в некоторой материальной форме, называется сообщением, а физическое средство передачи сообщения - сигналом. Или иначе: сигнал - это процесс изменения во времени физического параметра какого-либо объекта, служащий для отображения, регистрации и передачи сообщения. Информационная система - это любая система (установка, совокупность устройств, отдельное устройство, прибор, блок и т.д.), предназначенная для любого типа обработки информации: приема, генерации, запоминания, преобразования и т.д. В информационных системах (ИС) обычно осуществляется и преобразование типа сигналов, включая их физическую...

Words: 12416 - Pages: 50

Free Essay

Java Graphical User Interface (Gui) and Design Document

...IT110-1204A-01: Introduction to Programming Java Graphical User Interface (GUI) and Design Document Joseph Mirabal 11/12/2012 Table of Contents Project Outline 3 Class Diagrams 5 Use Case Diagrams 8 Java Fundamentals 10 Java Application Planning Worksheet 10 Final value 10 Java classes used: 11 Java Control Structures 12 Java Application Worksheet 12 Explain what this piece of code is doing: 13 Error Handling and File Input/Output 15 Final Application Design & Screenshots 37 Project Outline The company I am going to hypothetically create will be a sports store dedicated to selling different types of sporting equipment for all types of sports. I will mainly start my store by just selling sports balls. I will call my store Joey’s Sporting Balls and Equipment. I know the name sounds funny, but I am doing that on purpose to catch the attention of my potential customers. I want the name of my store to stick in their minds, and what better way to o than a pun or play on words. I will start off with two types of balls, a football and a basketball. The football will be brown in color, will have white laces, and will come in different sizes according to the level of the athlete and also to have a range in prices. It will range in size from miniature footballs for fun, small for beginners and as gift items, medium or college level, and to a large size for professional athletes, or just people who like to imitate professional athletes for...

Words: 2125 - Pages: 9

Premium Essay

Interface Esa

...EMS 503 Prasad Naik Background Interface Flooring Systems, Inc. was founded by Ray Anderson in 1973 as a joint venture between Carpets International Plc., a British company, and a group of American investors. He set up operations in LaGrange, Georgia, and embarked on a mission to adapt European technology to produce America’s first free-lay carpet tiles. In early 1990,Interface goes green and step up goal to reduce their negative impact on Environment. During 1995 executives of Interface to take step ahead and introduced The “Evergreen Services Agreement”(ESA). It provided for the following: (1) carpet and installation; (2) carpet maintenance; (3) selective replacement of tiles; and (4) carpet removal at the end of its term (reclamation). But the problem with ESA was that it was too complex and many customers preferred to buy carpet than lease Also Interface manage to seal only such six agreements. Additionally, Interface recent agreement with University of Texas didn't went through and they end up buying carpet. Because of which the CEO Hendrix was in dual mind, to continue ESA or shut it down or modify it. Interface Goes Green In the early 1990s, during a Clinton-Gore administration placed environmental protection above its agenda, Due to which, Interface customers began expecting an explicit set of environmental protection policies from the world’s leading carpet tile producer. And also many people from research arm of interface recommended, in response to customers...

Words: 1050 - Pages: 5

Premium Essay

User Interface

...Human Factor and User Interface Assignment 1 For the Air Macao web site, I have described some comments which are in positive and negative ways. Positive things: 1. Strive for consistency: Using consistent font size and color in each area on the home page. Web sites use consistent layout in the same languages. 2. Cater to universal Usability: A new web site for those cities which “Air Macao” has the flight line provides their local language. For example: It provides Korean, Chinese and English. 3. Offer informative feedback: When purchasing flight tickets, this requires people to input their personal information. On the “Online Booking” page step 4, it requires users to fill-in personal information. If you entered something wrong, a dialog will be shown to tell user which item’s inputs are wrong. 4. Design dialogs to yield closure: On the “Online Booking” page, whenever users purchase tickets, it tells that there are six steps (procedures) to complete a transaction in the beginning. When you finished step one, it indicates you to the second step, step by step. 5. Prevent error: For the user’s input data, when users who want to purchase/book tickets, it provides 2-D menu calendars and drop-down lists for those cities “Air Macao” provides flight line on the “Online Booking” page. 6. Permit easy reversal of actions: When purchasing tickets on the “Online Booking” page, it provides a “Last Step” button on the bottom of the web page for users to redo...

Words: 908 - Pages: 4

Free Essay

Input Output Interfaces

...The Professor Messer video Input/output Interfaces ranging from Audio ports, Video ports, USB ports and the Serial port. In summary the video starts with talking about the Audio ports that are 3 and a half millimeter TRS plugs that have different colors that define them. However, these colors are not standard so it advices that we double check just to make sure the right plug is put in the right port. The Video ports follow next in the video. With these we look at the Analog type which had the VGA (Video Graphic Array) port also known as the DE-15. This one has been here forever. It’s a 15 pin connector with DE size. With the Video ports we also look at the Digital ports which include the DVI (Digital Video Interface). This one is able to support a lot of the video format both digital and analog. Video ports also include the HDMI port (High Definition Multimedia Interface). This one is the latest and is always digital. It’s able to support digital and to send audio as well. Most machines produced these days have this port. USB (Universal Serial Bus) are the other ports talked about. These are very common and may look similar at times but support different speeds. * USB 1.0 is the low speed interface, not common anymore but ran at 1 and half megabits per second. * USB 1.1 is known as the full speed USB port that runs at 12 megabits per second. * USB 2.0 is very common with a lot of machines today, it runs at a speed of 480 megabits per second and can used for...

Words: 632 - Pages: 3

Premium Essay

Interface Case Study

...manufacturer) gets the business every few years, typically 7-10 years. Due to the large gap in time when the business happens in a traditional market, it may not be possible for the manufacturer to maintain the relations with the customers to secure the repeat business. The long-term customer relationship aspect of the services model enables the seller of the service to maintain the relationship with the customer and get the repeat business after expiry of the lease thereby increasing the retention rate. 2. What is your assessment of Interface’s Evergreen Services business model in 2002? Why is Interface having difficulty in selling Evergreen Service Agreements? From 1995, when Interface started offering the Evergreen Services to the customers, its approach has been to provide a complete end to end solution for floorcovering needs of its customers. In order to achieve the goal, Interface tried to make the offering financially appealing to the customers by offering the...

Words: 920 - Pages: 4

Free Essay

Usb Interface for It Students

...Mansimar Nanda  Information Technology  March 2, 2016  Professor Mondol     USB Interface     In today’s new world of technology, we are very fortunate to be have USB ports,  many of us ask ourselves about what USB ports are and why they play an important role  in our lives. USB stands for Universal Serial Bus and is used for so many purposes  whether that be in the technical world or daily uses. The main purpose of the USB is to  receive and deliver different types of data. This is a protocol for connecting peripherals  to a computer.    USB are small, reversible, fast, powerful, and flexible. They play a really big part  in my college life. Being an IT stupid means that I have many essays and projects to  complete, and with the help of a USB I can easily save my information and not have to  worry about it getting deleted. Many times I have important documents such as resumes  and job applications, but with just a couple steps I can keep all my files safe. USB are  also very helpful to me when I have to make a presentation in class, rather than having  to drag my laptop  with me I can just connect my USB and my presentation will appear  on the screen.   USB have been around for almost 20 years now. The first USB starts to develop in     1994, this was Co invented by an Indian young man named Ajay Butt. Ajay collaborated  his idea with 7 well known companies. Compaq, Dec, IBM, Intel, Microsoft, Nec, and  Nortel got together and created the first USB specification. After a year had passed the ...

Words: 939 - Pages: 4

Premium Essay

Nt1310 Unit 7 Summary

...signaling points. 5. SS7 PROTOCOL STACK: The hardware and software functions of the SS7 protocol are divided into functional abstractions called "levels." These levels map loosely to the Open Systems Interconnect (OSI) 7-layer model defined by the International Standards Organization (ISO). Image Source: http://www.eurecom.fr/~dacier/Teaching/Eurecom/Intro_computer_nets/ Recommended/ss7.pdf 7 | P a g e Signaling System 7 The OSI Reference Model and the SS7 Protocol Stack: Message Transfer Part: The Message Transfer Part (MTP) is divided into three levels. 1. The lowest level, MTP Level 1, is equivalent to the OSI Physical Layer. MTP Level 1 defines the physical, electrical and functional characteristics of the digital signaling link. Physical interfaces defined include E-1 (2048 kb/s; 32 64 kb/s channels), DS-1 (1544 kb/s; 24 64kb/s channels), V.35 (64 kb/s), DS-0 (64 kb/s) and DS-0A (56 kb/s). 2. MTP Level 2 ensures accurate end-to-end transmission of a message across a signaling link. Level 2 implements flow control, message sequence validation and error checking. When an error occurs on a signaling link, the message (or set of messages) is retransmitted. MTP Level 2 is equivalent to the OSI Data Link Layer. SS7 Signal Units: An SS7 message is called a signal unit (SU). There are three kinds of signal units: 1. Fill-In Signal Units (FISUs), 2. Link Status Signal Units (LSSUs) 3. Message Signal Units (MSUs) 3. MTP Level 3 provides message routing between signaling points in the SS7 network...

Words: 1985 - Pages: 8