make an interface for java programing, like this. and say how to implement those methods As an
Fantastic news! We've Found the answer you've been seeking!
Question:
make an interface for java programing, like this. and say how to implement those methods
Transcribed Image Text:
As an example, // Energy Manager models energy usage in an electrical grid in terms of energy // sources and energy consumers at a given point in time during the day. Provides // methods to allocate energy between sources and consumers, methods to prioritize // sources and consumers, and methods to deprioritize sources and consumers. public interface Energy Manager { } // Returns a map describing energy allocations in the energy grid. If sources // or consumers are prioritized, they will be allocated first. If there is not // enough energy to satisfy all consumers, allocations are made to prioritized // consumers first. Then, consumers will be allocated energy in the order they // appear the consumers list. public Map allocate( List sources, List consumers); // Prioritize the given energy source for allocation (e.g. renewables) public void prioritize (Energy Source source); // Prioritize the given energy consumer for allocation (e.g. infrastructure) public void prioritize (Energy Consumer consumer); // Deprioritize the given energy source for allocation (e.g. non-renewables) public void deprioritize (EnergySource source); // Deprioritize the given energy consumer for allocation (e.g. residences) public void deprioritize (Energy Consumer consumer); 71 K This particular interface also relies on other Java data types like Energy Source and Energy Consumer that we haven't defined. This is okay and encouraged, but take a moment in your meeting to discuss why you thought it would be helpful to have other data types that aren't just strings, numbers, or collections of strings or numbers. As an example, // Energy Manager models energy usage in an electrical grid in terms of energy // sources and energy consumers at a given point in time during the day. Provides // methods to allocate energy between sources and consumers, methods to prioritize // sources and consumers, and methods to deprioritize sources and consumers. public interface Energy Manager { } // Returns a map describing energy allocations in the energy grid. If sources // or consumers are prioritized, they will be allocated first. If there is not // enough energy to satisfy all consumers, allocations are made to prioritized // consumers first. Then, consumers will be allocated energy in the order they // appear the consumers list. public Map allocate( List sources, List consumers); // Prioritize the given energy source for allocation (e.g. renewables) public void prioritize (Energy Source source); // Prioritize the given energy consumer for allocation (e.g. infrastructure) public void prioritize (Energy Consumer consumer); // Deprioritize the given energy source for allocation (e.g. non-renewables) public void deprioritize (EnergySource source); // Deprioritize the given energy consumer for allocation (e.g. residences) public void deprioritize (Energy Consumer consumer); 71 K This particular interface also relies on other Java data types like Energy Source and Energy Consumer that we haven't defined. This is okay and encouraged, but take a moment in your meeting to discuss why you thought it would be helpful to have other data types that aren't just strings, numbers, or collections of strings or numbers.
Expert Answer:
Answer rating: 100% (QA)
public interface EnergyManager Returns a map describing energy allocations in the energy grid If sou... View the full answer
Related Book For
Business Ethics A Stakeholder And Issues Management Approach
ISBN: 9781523091546
7th Edition
Authors: Joseph W. Weiss
Posted Date:
Students also viewed these programming questions
-
"internet radios" for streaming audio, and personal video recorders and players. Describe design and evaluation processes that could be used by a start-up company to improve the usability of such...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
What favors the formation of continuous (dense) cleavage?
-
The financial statements of The North West Company Inc. are presented in Appendix A followed by the financial statements for Sobeys Inc. in Appendix B. Instructions (a) Calculate the liquidity ratios...
-
The Profit & Gambit Co. has a major product that has been losing money recently because of declining sales. In fact, during the current quarter of the year, sales will be 4 million units below the...
-
Show that after nearly all of the positrons were annihilated and the electron number density had nearly leveled off at the proton density, the ratio of the positron number density to the photon...
-
At the beginning of the current period, Engseth Corp. had balances in Accounts Receivable of $200,000 and in Allowance for Doubtful Accounts of $9,000 (credit). During the period, it had net credit...
-
A crystal was analyzed using X-ray diffraction with radiation from a copper source. The observed angle was 8.61. Determine the distance between layers of the crystal. d = Element (pm) CO 179 Cr 229...
-
Lang and Thomas, a local CPA firm, has been asked to bid on a contract to perform audits for three counties in its home state. Should the firm be awarded the contract, it must hire one new staff...
-
I5 Roose the nominal rate is 7% monthly compounding. Anne bought a condo for $600.000. She will borrow from Bank A. A 25% downpayment is required by Bank A. Show calculations for each question below....
-
Morenas Driving Schools 2015 statement of financial position showed non-current assets of 4.2 million. One year later, the 2016 statement of financial position showed non-current assets of 4.7...
-
Choose a developed and an emerging market economy and identify any differences and similarities between your chosen countries.
-
A company has net income of 173,000, a profit margin of 8.6 per cent, and a trade receivables balance of 143,200. Assuming 75 per cent of sales are on credit, what is the companys days sales in...
-
Sandy Grey Ltd is in the process of deciding whether or not to revise its line of mobile phones which it manufactures and sells. Their sole market is large corporations and they have not as yet...
-
What does the term window dressing mean in the context of financial statements? Identify three window-dressing techniques that companies use. What implications does this have for cash flows in terms...
-
Explain any possible ethical consequences for Henkel employees resulting from the overhauling/restructuring the companys old performance management system.
-
Fill in each blank so that the resulting statement is true. A solution to a system of linear equations in two variables is an ordered pair that__________ .
-
What are two conditions that eliminate a persons moral responsibility?
-
Imagine that every day you go to work you are exposed to toxic chemicals without having any protective clothing or safety training, and that the workplace has poor ventilation and poor fire safety....
-
You have been invited as a student who has studied business ethics to present a case to a CEO, CFO, and ethics officer of a midsize firm wanting to be Sarbanes-Oxley compliant. You have been asked to...
-
Dalia owns a small public relations firm and wants to contract with her insurance provider to offer her employees the option to purchase short-term disability insurance. The insurance will pay out...
-
Distinguish between portfolio (capital) investment and direct investment.
-
What are performance requirements?
Study smarter with the SolutionInn App