






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The concept of Java interfaces, their properties such as abstract methods, constants, default methods, and static methods. It also covers the process of declaring interfaces, extending interfaces, and implementing interfaces with examples. a part of Object-Oriented Programming (OOP101) course materials from Norzagaray College.
Typology: Exercises
1 / 11
This page cannot be seen from the preview
Don't miss anything!







Property of Norzagaray College OOP Object-Oriented Programming
Learning Task 11 to 12 will focus on the concepts and Methods of Interfaces DESIRED LEARNING OUTCOMES At the end of this learning task, students should be able to:
ACTIVITY 11- NAME: _________________________________ COURSE & SECTION: _____SCORE: _____ Directions: Answer the questions in a yellow paper. 1. Read and study a technological Journal on the latest trend in creating a Java App using OOP approach 2. Write the title, author, website and published date, include the journal that you chose. 3. Write your reaction on the journal that you chose (this requires 300 words or more)
PRE-ASSESSMENT 11- NAME: _________________________________________ COURSE & SECTION: _________ Answer the following questions in a yellow of paper. 10pts each.
Property of Norzagaray College OOP Object-Oriented Programming public static void main(String args[]) { MammalInt m = new MammalInt(); m.eat(); m.travel(); } } This will produce the following result −
Mammal eats Mammal travels When overriding methods defined in interfaces, there are several rules to be followed − Checked exceptions should not be declared on implementation methods other than the ones declared by the interface method or subclasses of those declared by the interface method. The signature of the interface method and the same return type or subtype should be maintained when overriding the methods. An implementation class itself can be abstract and if so, interface methods need not be implemented. When implementation interfaces, there are several rules − A class can implement more than one interface at a time. A class can extend only one class, but implement many interfaces. An interface can extend another interface, in a similar way as a class can extend another class. Extending Interfaces An interface can extend another interface in the same way that a class can extend another class. The extends keyword is used to extend an interface, and the child interface inherits the methods of the parent interface. The following Sports interface is extended by Hockey and Football interfaces.
// Filename: Sports.java public interface Sports { public void setHomeTeam(String name); public void setVisitingTeam(String name); } // Filename: Football.java public interface Football extends Sports { public void homeTeamScored(int points); public void visitingTeamScored(int points); public void endOfQuarter(int quarter); } // Filename: Hockey.java public interface Hockey extends Sports { public void homeGoalScored(); public void visitingGoalScored(); public void endOfPeriod(int period); public void overtimePeriod(int ot); } The Hockey interface has four methods, but it inherits two from Sports; thus, a class that implements Hockey needs to implement all six methods. Similarly, a class that implements Football needs to define the three methods from Football and the two methods from Sports.
Property of Norzagaray College OOP Object-Oriented Programming Extending Multiple Interfaces A Java class can only extend one parent class. Multiple inheritance is not allowed. Interfaces are not classes, however, and an interface can extend more than one parent interface. The extends keyword is used once, and the parent interfaces are declared in a comma-separated list. For example, if the Hockey interface extended both Sports and Event, it would be declared as − Example public interface Hockey extends Sports, Event Tagging Interfaces The most common use of extending interfaces occurs when the parent interface does not contain any methods. For example, the MouseListener interface in the java.awt.event package extended java.util.EventListener, which is defined as − Example package java.util; public interface EventListener {} An interface with no methods in it is referred to as a tagging interface. There are two basic design purposes of tagging interfaces − Creates a common parent − As with the EventListener interface, which is extended by dozens of other interfaces in the Java API, you can use a tagging interface to create a common parent among a group of interfaces. For example, when an interface extends EventListener, the JVM knows that this particular interface is going to be used in an event delegation scenario. Adds a data type to a class − This situation is where the term, tagging comes from. A class that implements a tagging interface does not need to define any methods (since the interface does not have any), but the class becomes an interface type through polymorphism.
POST-ASSESSMENT 11- NAME: ____________________________ COURSE & SECTION: ______ SCORE: ____ A. Essay. Write your answer in a yellow paper. 100 pts
LEARNING TASK 13-14() TOPIC CASE STUDY CREATION PROPOSAL USING OOP APPROACH TOPIC OVERVIEW Learning Task 13 to 14 will focus on Case Study Creation using OOP Approach for subject completion DESIRED LEARNING OUTCOMES At the end of this learning task, students should be able to: 1. Identify the importance of creating a case study 2. Develop the creativity and analyzation creating an OOP system approach 3. Develop the Systems Analysis and Code Optimization
Property of Norzagaray College OOP Object-Oriented Programming
is the ability to access and process accounting information, which could be data, applications, etc. over the devices that are not restricted by the physical locations. That means you can access data or applications from anywhere using the tablet, laptop, smartphone, and other internet-connected devices. With certain solutions, you do not even require to download or install the application on the local device. Your internet browser can deliver that for you. It also means operations such as – managing financial transactions, maintaining payrolls, calculating taxes, etc., can be processed and monitored by the user over handheld devices without being in the office premises. The idea is to let the accounting operations continue over a device that the user is familiar and comfortable with. So, check WhatsApp messages from friends and also file the taxes for the client at the fingertips without any disruption. Why Mobile Accounting? Since the accuracy and security of accounting are as critical for businesses as for professionals, reliability has to be a necessary element with every innovation in the accounting industry. The rising abilities of mobile devices and improvements with security solutions have enhanced the reliability of mobile accounting solutions. According to a survey report by Software Advice, 64% of the respondents could access the mobile version of their accounting app. On the other hand, 36% of users said they could only access it through a mobile browser. However, there was no respondent who could not access the information through their smartphones.
Human resource software is designed to help employees and management perform at their full potential and is implemented by businesses of all sizes to boost productivity and overall employee satisfaction. Effective human resources software will integrate recruiting, onboarding, workforce management, time scheduling and management, payroll solutions and strategic human capital management. Human resources software is sometimes called human resource management systems (HRMS), human capital management (HCM) and Human resources information systems (HRIS). Though each term sounds different, they all refer to the system a company uses to effectively manage employees.
an enrollment system combines all activities involved in the entire enrollment process and integrates them into a system. This way, everything happens in one place, both online and offline. The conversation happened with the prospects, the pages they are visiting, their interests and motivations, their personal details, the meetings scheduled with them to name a few. The overall
Ecommerce, also known as electronic commerce or internet commerce, refers to the buying and selling of goods or services using the internet, and the transfer of money and data to execute these transactions. Ecommerce is often used to refer to the sale of physical products online, but it can also describe any kind of commercial transaction that is facilitated through the internet
POST-ASSESSMENT 13- NAME: ____________________________ COURSE & SECTION: ______ SCORE: ____ A. Essay. You can write this in word or pdf format. 10 pts each
Property of Norzagaray College OOP Object-Oriented Programming
LEARNING TASK 15() TOPIC PROTOTYPE FORMAT AND REQUIREMENTS Learning Task 13-14 will discuss the Prototype of the software and requirements to develop a functional Mobile Application for Case Study DESIRED LEARNING OUTCOMES: At the end of this learning task, students should be able to:
ACTIVITY 15 NAME: _________________________________ COURSE & SECTION: _____SCORE: _____ Answer the following questions. Use a separate sheet of paper for your answer. 10 pts. each.
PRE-ASSESSMENT 15 NAME: _________________________________________ COURSE & SECTION: _________ Answer the following questions. Use a separate sheet of paper for your answer. 30 pts.
CONTENT DEVELOPMENT 15
Software prototyping is the activity of creating prototypes of software applications, i.e., incomplete versions of the software program being developed. It is an activity that can occur in software development and is comparable to prototyping as known from other fields, such as mechanical engineering or manufacturing. A prototype typically simulates only a few aspects of, and may be completely different from, the final product. Prototyping has several benefits: the software designer and implementer can get valuable feedback from the users early in the project. The client and the contractor can compare if the software made matches the software specification, according to which the software program is built. It also allows the software engineer some insight into the accuracy of initial project estimates and whether the deadlines and milestones proposed can be successfully met. The degree of completeness and the techniques used in prototyping have been in development and debate since its proposal in the early 1970s
. The purpose of a prototype is to allow users of the software to evaluate developers' proposals for the design of the eventual product by actually trying them out, rather than having to interpret and evaluate the design based on descriptions. Software prototyping provides an understanding of the software's functions and potential threats or issues.[1] Prototyping can also
Property of Norzagaray College OOP Object-Oriented Programming
Below are some of the popular Software Prototyping Tools
Property of Norzagaray College OOP Object-Oriented Programming One of Pidoco's strength is that it makes it easy for you to test-drive your prototype on various screens (desktop, mobile, smartphone) and to share a responsive prototype without the need to install or upload any code. I would conclude that, although Pidoco has a limited selection of icons and colors, it's really great for quick, focused prototyping and ideation.
POST-ASSESSMENT 15 NAME: ________________________________ COURSE & SECTION: _____ SCORE: ____ Answer the following questions. Use yellow paper for your answers. 20 pts. each.