Assume the existence of an interface, GUIComponent with the following methods: - open and close: no parameters, returns boolean - move and resize: accepts two integer parameters and returns void Define a class, Window, that implements the GUIComponent interface, and has the following members: - width, height, xPos, and yPos integer instance variables, with xPos and yPos initialized to 0 - a constructor that accepts two integer variables (width followed by height) which are used ti initialize the width and height instance variables - An implementation of open: that sends "Window opened" to System.out, and returns true - An implementation of close that sends "Window closed" to System.out, and returns true - An implementation of resize that modifies the width and height variables to reflect the specified size - An implementation of move that modifies xPos and yPos to reflect the new position

Answers

Answer 1

The implementation is as follow,

public class Window implements GUIComponent {

private int width:

private int height;

private int xPos;

private int yPos;

public Window(int width, int height) {

xPOS = 0;

yPos = 0;

this.width = width;

this.height = height;

}

public boolean open() {

System.out.printIn("Window opened");

return true:

}

public boolean close() {

System.out.println("Window closed');

return true;

}

public void resize(int wid, int hei) {

width = wid;

height = hei;

}

public void move(int ×, int y){

xPos = x;

yPos = y;

}

}

Learn more about such codes here https://brainly.com/question/14492046

#SPJ10


Related Questions

The commented line states that I have assigned a 2D array to a pointer but I want array of such pointers which could store numbers of 2D Array.

Answers

It is impossible to store numbers or contents of 2D array to a pointer array.

How to store pointers in 2D Arrays?

Arrays and pointers are different data structure elements, and there is a limit to the operations that can be performed on both.

Having said that, it is impossible to store numbers or contents of 2D array to a pointer array.

The closest you can do, is to use the following declaration:

int *p[] = {(array-type [][number of columns]) {Array-content}}

Read more about arrays and pointers at:

https://brainly.com/question/17355709

#SPJ1

Answer:

Get the element => *( (int *)aiData + offset ); calculate offset => offset = (1 * coloumb_number)+ 2); Add offset in array base address => (int *)aiData + offset; //here typecast with int pointer because aiData is an array of integer Get the element => *( (int *)aiData + offset );

Pls guys I need help fast my PC is new and it can't connect to a network

Answers

Answer:

There are several reasons why your PC might not be able to connect to Wi-Fi. You should first make sure that your PC's Wi-Fi adapter hasn't been turned off, or needs to be reset. The issue might also be with the Wi-Fi, not your PC — make sure that it works on other devices.

Answer:

Use ethernet cable, it worked for me!

what are differences between Ram and Rom?​

Answers

Answer:

RAM, which stands for random access memory, and ROM, which stands for read-only memory, are both present in your computer. RAM is volatile memory that temporarily stores the files you are working on. ROM is non-volatile memory that permanently stores instructions for your computer.

Explanation:

Answer:

RAM is random access memory - we can have it even after we shut down the computer. it is volatile .it stores temporarily.

ROM - Read only memory. it is non volatile memory. we can only have it until computer is turn on. after that it's gone.it stores memory permanently

Q For each of the following words identify the byte that isstored at lower memory address and the byte that is stored athigher memory address in a little endian computer.
a. 1234
b. ABFC
c. B100
d. B800

Answers

C is the correct answer for this question

How to change the command prompt of a computer​

Answers

- Open the Terminal tab in the Command Prompt's Properties window.
- Next, in the Terminal Colors section, select the options you want to change
- You can also change the cursor type to Underscore, Vertical Bar, Empty Box, or Legacy Style.

Create a scenario of a hypothetical company that needs an information system. This scenario should include the following information:
a) Size of the project
b) Staff/experts availability
c) System level of criticality
- Then explain the development methodology (waterfall, agile …etc.) would you choose in this case? Why?

Answers

A  hypothetical company that needs an information system is Memphis drilling and construction company.

What is the size of a project?

This is known to be the  the number of firms taking part in the project and thus in the case above, it is small project.

In terms of Staff/experts availability, there are experts from the mining industry with years of experience, soil survey analyst as well as other minor staff.

In terms of System level of criticality, it is big because the extent to drilling will make use of the information system and other major decisions made.

Learn more about  information system from

https://brainly.com/question/14688347

#SPJ1

The Electronics Communications Privacy Act allows the government to have access to....?

Answers

Personal information like who the person is, what they do, and where they go are the information that can be accessed by the government under the Electronics Communications Privacy Act.

What is Electronics Communications Privacy Act?

Electronic Communications Privacy Act allows the government to have the authority to the suspicious activity that takes place at social sites or through the use of electronic devices.

The unlawful acts and issues are overseen so that any violent circumstances do not arise. The data is provided through networking sites, cell phone providers, etc.,

The suspicious and unlawful activities are tracked through the electronic device that allows the government to keep track of the activities that can be a threat to them and the country.

Therefore, the act allows the government to track personal information which is unlawful and unauthorized.

Learn more about Electronics Communications Privacy Act here:

https://brainly.com/question/3773028

#SPJ1

When replacing a defective switch what is necessary characteristic of a new switch

Answers

The complete question is :

When replacing a defective switch, what is a necessary characteristic of the new switch?

Select one:

a. Greater number of poles and throws than the original switch

b. The same number of positions as the original switch

C. Identical cover plate as the original switch

d. Greater current ratings than the original switch

So, according to it the correct answer is option d. Greater current ratings than the original switch.

What is a switch?

A switch is a component of physical circuitry that controls the flow of signals. A switch or toggle switch enables the opening or closing of a connection. The switch permits a signal or power to pass through the connection when it is opened. The switch cuts the circuit connection and halts the flow when it is closed.

Learn more about switches here https://brainly.com/question/14883923

#SPJ10

List and describe four services that comprise IT infrastructure, beyond physical devices and software applications.

Answers

The four services that comprise IT infrastructure are:

Telecommunications services. Data management services . Application software services.Physical facilities management services.

What does these services do?

Telecommunications services is known to help in terms of giving data, voice, and video network.

Data management services helps to save , manage, and analyze all data. Application software services helps to give firms-wide range capabilities.

The Physical facilities management services helps to make and handle physical installations of technology.

Therefore, The four services that comprise IT infrastructure are:

Telecommunications services. Data management services . Application software services.Physical facilities management services.

Learn more about  IT infrastructure from

https://brainly.com/question/869476

#SPJ1

what is the function of computer?​

Answers

[tex]\huge\purple{Hi!}[/tex]

the four basic function of a computer are input, storage, processing and output.

Software that functions as an electronic version of a filing cabinet?

Answers

Answer: There are a lot of choices

Explanation: do you want a database? You can obtain a terabyte or even larger size thumb drive or USB drive

Do want a print server? a networked drive specific for your data and if you have  to   print out anything

Do you want a connected drive to send all your documents to with organized folders?  any size drive will work for this they come all prices

Enter the electronic filing system, sometimes called document management software. These computerized filing systems provide electronic file management. In other words, they give us a simple way to store, organize, and retrieve digital files and digital documents and pdfs.

https://www.filecenter.com/info-electronic-filing-system.html here is some good software

what are the importance of computer software​

Answers

Answer:

It controls and coordinates all hardware and software functions within your PC. It is designed to be ever-improving so that newer tasks are performed more efficiently.

Software not only makes your computer hardware perform important tasks, but can also help your business work more efficiently. The right software can even lead to new ways of working. It is therefore a crucial business asset and you should choose your software carefully so that it matches your business needs.

Give an implementation of the abstract data type of a priority queue of integers as an
ordered list using the SML syntax (ML functor). Given the following:

type Item
val > : Item * Item -> bool

Answers

We can use the code for IntPQ to implement the priority queue construction:

functor PQUEUE(type Item  

              val > : Item * Item -> bool  

             ):QueueSig =  

struct  

   type Item = Item  

   exception Deq  

   fun insert e [ ] = [e]:Item list  

     | insert e (h :: t) =  

       if e > h then e :: h :: t  

                else h :: insert e t  

   abstype Queue = Q of Item list  

   with  

       val empty          = Q []  

       fun isEmpty (Q []) = true  

         | isEmpty _      = false  

       fun enq(Q q, e)    = Q(insert e q)  

       fun deq(Q(h :: t)) = (Q t, h)  

         | deq _          = raise Deq  

   end  

end;

What is SML?

The capital asset pricing model (CAPM), which displays varying levels of systematic, or market risk, of various marketable securities plotted against the projected return of the entire market at any one time, is represented graphically by the security market line (SML), a line drawn on a chart.

The supplied predicate, which we consider to be a total ordering, can be used as the priority order in a priority queue. The end result is a structure with a new type for the queue and a number of operations that work with it. We create a new structure from a group of types and values (a structure), and we represent this creation as an ML functor. A functor takes a structure and produces a new structure, much as how a function takes a value and makes a new value. To accomplish the formation of the priority queue, we can utilize the IntPQ code.

Learn more about SML here https://brainly.com/question/15901527

#SPJ10

Efficiency in computation is achieved by

Answers

Answer:

Computational efficiency measures the amount of time or memory required for a given step in a calculation, such as an evaluation of a log posterior or penalized likelihood.

Statistical efficiency typically involves requiring fewer steps in algorithms by making the statistical formulation of a model better behaved.

what actions should be taken on improvement backlog items from the problem-solving workshop

Answers

Actions that should be taken on improvement backlog items from the problem-solving workshop are:

The team then casts a combined vote on the top three possibilities.The following PI Planning event will receive them rephrased as improvement stories and features. The RTE assists in making sure that the pertinent work required to deliver the specified changes is planned throughout that time.By closing the loop, action will be taken and the appropriate personnel and resources will be committed to enhancing the current situation.

What is problem solving workshop ?

The ART conducts an organized, root-cause problem-solving workshop to address systemic issues. Instead than focusing only on the symptoms of an issue, root cause analysis offers a set of problem-solving tools used to determine the true causes of a problem. In a timebox of two hours or less, the RTE often facilitates the session.

Learn more about problem solving workshop here https://brainly.com/question/14362975

#SPJ10

How ict tools changed the way we live explain it​

Answers

Answer:

How does ICT change our way of living?

ICT has contributed a lot to change our everyday life such as letter to e-mail, market shopping to on-line shopping, classroom learning to e-learning, etc. This paper present's the effects of ICT as Home and Domestic Activities, Social Networking, Education, Health, Commerce, Banking, and Employment.

What is not a computer software?
a. web browser
b. powerpoint
c. motherboard

Answers

Answer:

Motherboard

Explanation:

Its a device in the computer that helps it run while powerpoint and web browser are just things you can do with your computer to make or create information.

When dividing it’s total debt by total equity what’s a company trying to measure

Answers

Answer:

A business's debt-to-equity ratio, or D/E ratio, is a measure of the extent to which a company can cover its debt. It is calculated by dividing a company's total debt by its total shareholders' equity. The higher the D/E ratio, the more difficult it may be for the business to cover all of its liabilities.

When dividing its total debt by total equity, a company is trying to measure its leverage or debt-to-equity ratio.

What does this indicate?

This ratio indicates the proportion of debt used to finance the company's assets compared to its equity. It helps assess the company's financial risk and its ability to meet its debt obligations.

A higher debt-to-equity ratio implies higher financial leverage and indicates that the company relies more on debt financing, which can increase its financial risk. Conversely, a lower ratio suggests a lower reliance on debt and a stronger financial position.

Read more about debt-to-equity ratio here:

https://brainly.com/question/27993089

#SPJ2

1.Which thematic group uses technology to direct the behavior of dynamical systems, ensuring that they behave in a predictable manner?
2.Which thematic group creates circuits with miniature, packaged components that directs and control electricity?

a.Communication Systems
b.Control Systems
c.Computer Systems
d.Energy Systems
e.Electronic Systems

Answers

Dynamic systems are governed by control systems, whereas electronic systems contain the minuscule parts required to conduct electricity. Option E is correct.

What are groups?

People who concentrate on the same issue or idea form thematic groups. Individuals with experience in diverse systems make form thematic teams working on various initiatives and concepts.

In order to achieve the intended outcome, the control system's main purpose has been to govern dynamic systems.

The electronic system theme group's job is to put electronic miniatures in systems that act as power-control mechanisms. Thus, option E is correct.

Learn more about thematic groups. here:

https://brainly.com/question/14835569

#SPJ1

E. Write an algorithm to show 'How to prepare a cucumber sandwich?". ​

Answers

Answer:

Place slices of bread on plate, side by side...

Postcondition: Sandwich is ready to eat.

Step 1: Start with the number 1.

Step 2: find another person and form a pair.

Step 3: add your numbers together.

Step 4: one person from the pair sits down.

Step 5: the other person goes back to step 2.

total_coins = 0

nickel_count = int(input())
dime_count = int(input())




print(total_coins)

Answers

The code statement that completes the program is total_coins = nickel_count + dime_count

How to complete the segment?

From the code segment, we have the following highlights:

total_coins is initialized to 0, at line 1Inputs for nickel_count and dime_count are taken on lines 2 and 3The last line prints total_coins

The above means that total_coins has not been calculated.

This is calculated using:

total_coins = nickel_count + dime_count

The above must be placed before the last line of the program

Read more about code segments at:

https://brainly.com/question/24833629

#SPJ1

Complete question

Complete the code segment to calculate the total number of coins

total_coins = 0

nickel_count = int(input())

dime_count = int(input())

print(total_coins)

3. Which of the following is most likely fake news?
O A. Content from a website that ends in ".edu"
OB. A news site that lists all of its contributing authors
OC. An article that tries to sell you miracle weight loss pills
O D. An academic resource listed in a bibliography

Answers

Answer:

C. An article that tries to sell you miracle weight loss pills

What should the Dhruv consider when connecting to the Internet in a public place? Select all that apply.

Answers

Dhruv should be more careful while using internet in a public place

What is software engineering? What are the objectives of software engineering?

Answers

Answer:

The basic objective of software engineering is to develop methods and procedures for software development that can scale up for large systems and that can be used consistently to produce high-quality software at low cost and with a small cycle of time.

Explanation:

What is wrong with this case statement -> case (x > 2):
A. cases can't have a test condition
B. cases must be capitalized
C. cases must use a ; and not a :

Answers

Answer:

A: cases can't have a test condition

Explanation:

Under the hood, switch statements don't exist. During the mid-stage of compilation, a part of the compiler will lower the code into something that is easier to bind. This means that switch statements become a bunch of if statements.

A case in a switch statement acts upon the switch value. Think of the case keyword as the value you pass into the switch header:

int x = 10;

switch (x)

{

case (x > 2):

     // Code

     break;

}

// Becomes

if (x(x > 2))

{

// Code

}

// Instead do:

switch (x)

{

case > 2:

     // Code

     break;

}

// Becomes

if (x > 2)

{

// Code

}

identify four input devices that can convert hard copy pictures or into a digital format ​

Answers

Answer:

(a) graphics tablet

(b) scanner

(c) MICR

(d) OMR

HELP QUICK!!!!!!!

Which item is used in Excel to identify the row of a particular cell?
O letter
O number
O type
O sheet

Answers

Answer:

Number.

Letter is for columns, Number is for rows.

For example to find the cell on the fifth row, and 1st column, it would be A5.

What type of software can Agile and DevOps be applied

Answers

Answer:

STATA AND SPSS

Explanation:

these are mostly widely used statistical package in modern statistical calculations. it is minimizes times and as well as resources.

compare the results of both the RATS and Skipfish reports.

Answers

Answer:

The results of both reports RATS is known nas mouse and skipfish is known as one type of fish

Design a program that asks the user for a series of names (in no particular order). After the final person’s name has been entered, the program should display the name that is first alphabetically and the name that is last alphabetically. For example, if the user enters the names Kristin, Joel, Adam, Beth, Zeb, and Chris, the program would display Adam and Zeb.
In pseudo and java

Answers

The program for the same in python is as follows :

#This gets the count of names to be input

count = int(input("Total names: "))

#This initializes the list of names

names = []

#This iteration gets all names

for i in range(count):

  #This gets a name

  name = input("Enter a name: ")

  #This appends it to the list

  names.append(name)

#This sorts the name

names.sort()

#This prints the first and the last name, alphabetically

print(names[0] + " " + names[-1])

Learn more about such codes here https://brainly.com/question/22654163

#SPJ10

Other Questions
Who created the great compromise Which vector is the sum of the vectors shown below?A.B.C.D. The following scenario provides an example of which principle in the Preamble?: A factory in Pennsylvania has been illegally dumping waste into the Ohio River. The waste has flowed onto the banks and into the drinking water of residents in Ohio and Kentucky. Ohio and Kentucky are understandably upset and want to impose trade sanctions on Select one: a. provide for the common defense b. insure domestic tranquility c. provide all citizens with everything they desire d. establish a monetary system e. Pennsylvania to punish them. However, the Constitution grants power to the federal government to create courts to deal with arguments between states and resolve issues. Jump to... what role did the middle class play in the development of government Hi i just need a topic for essay SBI4U(Biology 12) thank you:) What do scientists and engineers have in common? As a student of Business Ethics and a managing director of a multinational company, discuss five (5) factors you will consider in managing the multi-cultural and diversified workforce in Ghanaian business organizations. Some critics of the unemployment rate say that it under-reports the actual unemployment problem by: Which is the equation of a line that has a slope of 1/2and passes through point (2, -3)? PLEASE HELP!!!!Which operation should you perform last in the expression 3^2 + 2? What do the differences between the points (as shown on the graph) represent?On a coordinate plane, point B is at (2, 7) and point D is at (4, 14). Scenario:You decide to eat the entire package of a particular food. In order to calculate the number of calories that you have eaten, what two pieces of information do you need to multiply? View attachment.Select the TRUE statement(s)- K.C was unable to recognize his family and usually forgot his name-K.Cs bilateral hippocampal damage probably accounts for his anterograde declarative amnesia-K.Cs case suggests that NO declarative memories are stored in the cortex Which is a true statement about an exterior angle of a triangle Identify the type of phrase that is underlined below.She preferred eating at the local deli for lunch. ? QuestionSelect the graph of the transformation.The graph f(x)= is transformed to formshows g(x). Now that you've started to think more about your topic, it's time to write your essay. Use the Process section to help you write a well-structuredresponse to the question you've picked.ProcessFollow the steps below to complete your essay, and use the links provided to assist with your research and writing. When you have finished youressay, use the drop box to submit it to your teacher.1. Gather sources. Begin by gathering additional sources C-either online or otherwise-to support the views you preeach source, consider these questions:Who authored the document?What is the purpose of the document?When was the document written?What significant historical event or movement does the document represent?2. Read and evaluate sources. Examine each source C and think about how you will use to support a thesis. Be an active researcher byasking the following questions about each source you reference:What is the credibility of the source? Is there any noticeable bias?How does the author form his or her argument?What important themes, main ideas, and arguments are presented in the document?3. Write your essay. Refer to your notes and the provided documents to write a short essay 2. Be careful to keep the following ideas inmind:To avoid plagiarism, make sure to cite your sources properly with in text citations E and a works cited page C.When you finish, reread the essay to check for all of the points above, and then proofread it to be sure your work doesn't containerrors in grammar or spelling.BY x % 15pxAVL'EEEFEEDSEB Lief starts saving for his future and deposits $425 each month at 5.7% annual interest, compounded monthly, for 25 years. At the end of 25 years, he has an account balance of $281,292.21. How much of this did Lief contribute and how much of this is interest? 3.14(a2 + ab) when a = 4 and b = 3 9. What happens to the food in the mouth?