In this program you are to simulate a 2-pass assembler in C++. The input to this program is an assembly language program (see the handout on SMC 68000) and the output should include a symbol table and the machine code version of the input. You have to echo the input. Do file I/O You are implementing two classical algorithms (Fig. 6.1 & Fig 6.2). INPUT ORG MOVE TRAP MOVE MOVE ADD MOVE ADDI TRAP TRAP END S00000500 #79, $00002000 #1 DO, S00002004 S00002000, DO S00002004, DO DO, S00002002 #18,$00002002 #2 #0 READLN (Y), INPUT INTO DO STORE DO IN LOCATIONY FETCH VARIABLE I FOR THE AD ADD Y+1 LOOP1 STORE THE SUM IN X LOOP2 ADD 18 TOX PRINT X STOP OUTPUT Address Machine code Operands Instructions 00000500 33FC 4F MOVE #79, s00002000

Answers

Answer 1

Using the knowledge in computational language in C++ it is possible to write a code that  should include a symbol table and the machine code version of the input.

Writting the code:

#include< stdio.h>

#include< string.h>

#include< conio.h>

void main()

{

char *code[9][4]={

{"PRG1","START","",""},

{"","USING","*","15"},

{"","L","",""},

{"","A","",""},

{"","ST","",""},

{"FOUR","DC","F",""},

{"FIVE","DC","F",""},

{"TEMP","DS","1F",""},

{"","END","",""}

};

char av[2],avail[15]={'N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'};

int i,j,k,count[3],lc[9]={0,0,0,0,0,0,0,0,0},loc=0;

clrscr();

printf("----------------------------------------------------\n");

printf("LABEL\t\tOPCODE\n");

printf("----------------------------------------------------\n\n");

for(i=0;i< =8;i++)

{

for(j=0;j< =3;j++)

{

printf("%s\t\t",code[i][j]);

}

j=0;

printf("\n");

}

getch();

printf("-----------------------------------------------------");

printf("\nVALUES FOR LC : \n\n");

for(j=0;j< =8;j++)

{

if((strcmp(code[j][1],"START")!=0)&&(strcmp(code[j][1],"USING")!=0)&&(strcmp(code[j][1],"L")!=0))

lc[j]=lc[j-1]+4;

printf("%d\t",lc[j]);

}

printf("\n\nSYMBOL TABLE:\n----------------------------------------------------\n");

printf("SYMBOL\t\tVALUE\t\tLENGTH\t\tR/A");

printf("\n----------------------------------------------------\n");

for(i=0;i< 9;i++)

{

if(strcmp(code[i][1],"START")==0)

{

printf("%s\t\t%d\t\t%d\t\t%c\n",code[i][0],loc,4,'R');

}

else if(strcmp(code[i][0],"")!=0)

{

printf("%s\t\t%d\t\t%d\t\t%c\n",code[i][0],loc,4,'R');

loc=4+loc;

}

else if(strcmp(code[i][1],"USING")==0){}

else

{loc=4+loc;}

}

printf("----------------------------------------------------");

printf("\n\nBASE TABLE:\n-------------------------------------------------------\n");

printf("REG NO\t\tAVAILIBILITY\tCONTENTS OF BASE TABLE");

printf("\n-------------------------------------------------------\n");

for(j=0;j< =8;j++)

{

if(strcmp(code[j][1],"USING")!=0)

{}

else

{

strcpy(av,code[j][3]);

}

}

count[0]=(int)av[0]-48;

count[1]=(int)av[1]-48;

count[2]=count[0]*10+count[1];

avail[count[2]-1]='Y';

for(k=0;k< 16;k++)

{

printf(" %d\t\t %c\n",k,avail[k-1]);

}

See more about C++ at brainly.com/question/29897053

#SPJ1

In This Program You Are To Simulate A 2-pass Assembler In C++. The Input To This Program Is An Assembly

Related Questions

what is something about you that is not included anywhere else in your application?

Answers

To one of the following questions, applicants must write a response of no more than 400 words using either the Coalition Application or the Common Application.

Through "the open exchange of ideas in an ethical, interconnected, and varied community," Yale carries out its objective. Think back to a moment when you discussed a significant subject with someone who had a different opinion. How did the event influence your beliefs—whether you choose to modify them or not, or why—and why did they become more compelling?

Think back to a moment when you helped a neighbourhood that you feel a connection to. Why do you think these initiatives are important? Community may be defined anyway you choose.

The following short response questions must also be answered by applicants submitting the Coalition Application or Common Application. Responses should be no longer than 200 characters (approximately 35 words).

Learn more about Application here:

https://brainly.com/question/28206061

#SPJ4

When a person scans a visual scene, he/she usually makes about _____ fixation(s) per second.
A. one
B. three
C. nine
D. twelve

Answers

— of the thumb but neglected to address individualization or per-prints at crime scenes in order to identify the person who by EH Holder Jr. She alleged a certain man.

What are examples of individualization

Think of yourself as a typical English instructor. Next, consider your students. Nobody's personality, language proficiency, memory capacity, skills, or hobbies are exactly the same as another person's, not even the kids in your class who are the same age as them. They learn and process information in various ways. They each have different perspectives on your lessons. They each have a different opinion of you.

Consequently, you are in front of your class. It's Monday morning, the start of this week, and the start of your meticulously prepared lesson.

Know more about  by EH Holder Visit:

https://brainly.com/question/30029921

#SPJ4

LBE Helpdesk, featured in this chapter, is an example of a(n) ____.
a. a freeware help desk package
b. an open source help desk package
c. a commercial help desk package
d. a shareware help desk package

Answers

This chapter includes LBE Helpdesk as an illustration of a for-profit support desk solution.

The right answer is C.

What is the business help desk?

Support professionals frequently outsource the help desk job. The phrase often refers to centralised user support offered within an organisation. A similar phrase is call centre, which refers to a location where clients can call to place orders, track shipments, get assistance with items, etc.

What tasks does a help desk perform?

A help desk offers technical assistance to end users, solves user and customer problems, and/or directs them through particular tasks and actions. Help desks can function independently or in conjunction with bigger service desks.

To know more about Helpdesk visit:

https://brainly.com/question/29590304

#SPJ4

All of the following are ways that can infect your computer with a virus, EXCEPT ________.
A) sharing flash drives
B) downloading video files from peer-to-peer sites
C) downloading or running an e-mail attachment file
D) logging into e-mail

Answers

D) logging into e-mail

Logging into e-mail itself is not a way to infect your computer with a virus. However, if you receive an infected attachment in an email and download or open it, your computer could become infected. Similarly, if you click on a malicious link in an email, your computer could be at risk of infection. Some best practices to protect your computer from viruses include avoiding downloading or opening suspicious emails or attachments, keeping your operating system and antivirus software up to date, and being cautious when downloading files or visiting unfamiliar websites.

____ records are data the system maintains, such as system log files and proxy server logs.

Answers

Data that the system keeps, like system log files including proxy server logs, are referred to as "computer-stored records."

Define the term computer-stored records?

Computer Record refers to both a printout produced from an electronic recording of data as well as an electronic record of that information.

Electronic data that such a person develops and stores on such a digital device is referred to as computer-stored records.Storage is the part of your computer that enables you to keep and access data for a lengthy period of time, as opposed to memory, which refers towards the location storing short-term data. Storage typically takes the form of a hard drive or solid-state drive.Authenticity of computer-generated documents is determined by the efficiency of the program that produced them.A computer's main storage is called Random Access Memory, or RAM. Your computer will temporary store data in RAM when you are working on a file.

Thus, data that the system keeps, like system log files including proxy server logs, are referred to as "computer-stored records."

To know more about the computer-stored records, here

https://brainly.com/question/29463755

#SPJ4

Server virtualization in Windows Server 2012 R2 is based on a module called the _________. A) virtual architecture B) hyper-v C) hypervisor D) virtual machine

Answers

The correct option C) hypervisor, Windows Server 2012 R2 uses a module as the foundation for its server virtualization.

Define the term hypervisor and its features?Virtual machines (VMs) are run and created by software called a hypervisor, also referred to as a virtual machine monitor or VMM. By virtually sharing its resources, such as memory and processing, a hypervisor enables one host computer to support numerous guest virtual machines (VMs).Because the guest VMs are independent of the host hardware, hypervisors enable the use of more of a system's available resources and increase IT mobility. As a result, it is simple to transfer them between servers.

A hypervisor reduces: because multiple virtual machines can run off of a single physical server.

Space.Energy.requirements for maintenance.

Type 1 hypervisors, also known as "bare metal," and Type 2 hypervisors, also known as "hosted," are the two most common types. While a type 2 hypervisor functions as a software layer on an operating system, much like other computer programs, a type 1 hypervisor runs directly on the host's hardware.

To know more about the hypervisor, here

https://brainly.com/question/11593458

#SPJ4

All of the following are ways to paste a copied file except
a. pressing Ctrl + V.
b. right-clicking the file list and clicking Paste in the shortcut menu.
c. pressing Ctrl + P.
d. clicking the Paste button in the Clipboard group.

Answers

All of the approaches listed below are employed for moving text in a document in Word 2016 depending on the context of the inquiry.

A word document's importance can be appreciated by the fact that it allows the user to type and save documents in accordance with their needs. It connects with other MS Office apps and is very accessible to the user. In Word 2016, you must either right-click on the text and choose "Cut," select the text, move the insertion point to the desired location, and then press Ctrl+V to move the text. Alternatively, you can select the text, press Ctrl+C, move the insertion point to the desired location, and then press Ctrl+V. As a result, Word 2016 uses all of the methods listed below to move text around in documents. D is the appropriate response to this question.

Learn more about Word 2016 here:

https://brainly.com/question/13338703

#SPJ4

How do display a shortcut menu for the main document area

Answers

A shortcut menu for the main document area can be displayed by right-clicking on the main document area. Right-clicking will open a context menu that contains a list of options that are relevant to the current context.

These options can include commands such as cut, copy, paste, and select all, as well as other options that are specific to the application or document you are working with.

Alternatively, some applications or operating systems allow you to display a shortcut menu by using keyboard shortcuts, such as the "Shift + F10" key combination, which can trigger the same context menu as right-clicking.

It is worth noting that the options available on the shortcut menu will vary depending on the application or document you are working with, and the specific context of the document area you right-click on.

Learn more about shortcut, here https://brainly.com/question/11484367

#SPJ4

Could someone please tell me what is the error in my code?

I'm trying to write a code for finding the cube of a number using C programming.

Answers

I think you have to remove the semicolon at the end of line 15. From what I see, this is not a logic error, rather than a syntax error.

Looking at the error on the bottom, it's expecting a '(' before the '{'.

Does RPA need new teams to do the work? a. Yes, because existing workers will not be able to adapt. b. No, because existing workers can be retrained. c. No, because people will no longer be needed with the implementation of RPA. d. It is too early to say; revisit this issue in a few years.

Answers

Robotic process automation has the potential to automate whole activities. but in more straightforward, approachable applications.

What is RPA versus automation?

Intelligent automation integrates artificial intelligence (AI) techniques including machine learning, natural language, structured data interaction, and intelligent document processing, whereas RPA tends to concentrate on automating repetitive and frequently rules-based procedures.

Does RPA need to be coded?

Even if you are not a programmer and have no coding experience, you can still become an expert in RPA. There are simpler tools that anyone can learn to use, but you'll need some familiarity with programming languages. Due to increased investment by big businesses, there is an increase in demand for RPA developers.

To know more about  RPA visit:

https://brainly.com/question/28914209

#SPJ4

onald runs both Windows 7 and Linux on his desktop computer. This process is called ________. a. PC virtualization b. server virtualization c. cloud computing d. desktop virtualization

Answers

Ronald runs both Windows 7 and Linux on his desktop computer. This process is called  PC virtualization.

When using virtualization software, a computer behaves as if it were two or more separate and independent computers, which is referred to as?

A single physical computer can behave as though it were two or more virtual machines when it is running a specialized program called virtualization software.

Which of the following functions as virtualization's brain?

The hypervisor is the brain of computing's virtualization, allowing the allocation of all computational tasks among the numerous virtual resources and enabling their effective and efficient completion by the physical CPU package placed in the hypervisor host.

To know more about  PC virtualization visit:-

https://brainly.com/question/29620580

#SPJ4

A claim edge in a resource-allocation graph indicates that
O a process may NOT request a resource
O a process may request a resource
O a process may release a resource that it has already been assigned
O none of the mentioned

Answers

The correct option is B i.e., a claim edge in a resource-allocation graph indicates that a process may request a resource.  

What do IT firms use as a process?

All firm activities related to information technology are standardized by IT business processes, raising their level of excellence and quality. No matter who carries out the IT business procedures, the services can guarantee delivery.

What is technology used in products and processes?

An innovation comprising the deployment of technologically novel products and processes as well as major technological enhancements in products and processes is referred to as a technological product and process innovation, or TPP innovation.

To know more about process visit-

https://brainly.com/question/13567816

#SPJ4

In data warehouses, _____ is information about data—its content, quality, condition, origin, and other characteristics.
A
.
metadata
B
.
big data
C
.
summary data
D
.
raw data

Answers

Metadata is information about the data—its content, quality, condition, provenance, and other characteristics—that is stored in data warehouses.

What is Metadata ?

Metadata condensed information about data in order to facilitate dealing with a particular instance of data.

Metadata is typically present in spreadsheets, websites, movies, and pictures.

The availability of metadata facilitates data tracking and dealing with such data. The time and date of creation, file size, data quality, and date produced are all examples of basic document metadata.

Metadata management and storage usually include the usage of databases.

Hence, Metadata is information about the data—its content, quality, condition, provenance, and other characteristics—that is stored in data warehouses.

learn more about Metadata click here:

https://brainly.com/question/14960489

#SPJ4

If the start index is _____ the end index, the slicing expression will return an empty string.
a. equal to
b. less than
c. greater than
d. not equal to

Answers

The slicing expression will produce an empty string if start index exceeds end index.

In a list, what is the first negative index?

A list's final element is identified by the index -1. May lists be concatenated using an operator or method.

Which approach would you use to check whether a specific substring is included in a string in Python?

To determine whether the substring is even contained in the string in the first place, use the in keyword. A Boolean value, which can be either True or False, is what the in keyword returns. The substring must be present in the string for the in operator to yield True. Before utilizing the find() method, it is beneficial to use the in keyword first.

To know more about string visit :-

https://brainly.com/question/14528583

#SPJ1

The React error "Too many re-renders. React limits the number of renders to prevent an infinite loop" happens when you have reached an infinite render loop. This may be due to several reasons.

Answers

Yes, that is correct. The "Too many re-renders. React limits the number of renders to prevent an infinite render loop" error is a common error that occurs when a component is causing an infinite loop of re-renders.

There are a number of causes for this, including:

Re-renders are triggered by state updates: If a component's state updates in reaction to a re-render of itself, this may result in an endless cycle of updates. This might occur if a function that is invoked during the render of the component—for example, by providing the function to an event handler—is what causes the state update.

Re-renders are triggered by prop updates: If a parent component is constantly giving new props to a child component, this may result in an endless loop of re-renders.

Mismatch between state and rendered element: Sometimes, re-rendering a component does not update the component's state.

Conditional rendering: When re-rendering is being caused by state-based conditionals.

To know more about Render loop kindly visit
https://brainly.com/question/30008984

#SPJ4

Yes, that is correct. The "Too many re-renders. React limits the number of renders to prevent an infinite render loop" error is a common error that occurs when a component is causing an infinite loop of re-renders.

What is the cause of Re-renders trigger?

There are a number of causes for this, including:

Re-renders are triggered by state updates: If a component's state updates in reaction to a re-render of itself, this may result in an endless cycle of updates. This might occur if a function that is invoked during the render of the component—for example, by providing the function to an event handler—is what causes the state update.

Re-renders are triggered by prop updates: If a parent component is constantly giving new props to a child component, this may result in an endless loop of re-renders.

Mismatch between state and rendered element: Sometimes, re-rendering a component does not update the component's state.

Conditional rendering: When re-rendering is being caused by state-based conditionals.

To know more about Render loop kindly visit

brainly.com/question/30008984

#SPJ4

The goal of _____ is to build a system that is effective, reliable, and maintainable.
a.
​ systems auditing
b.
​ systems reporting
c.
​ systems analysis
d.
​ systems design

Answers

To create a system that is efficient, dependable, and maintained is the aim of systems design.

Is a data validation rule applied to that data to ensure its accuracy?

When data must be in a specific order, a data validation rule known as a data type check is applied. A data validation rule called a combination check verifies if a data item matches the necessary data type.

What increases input quality by checking the data and removing any entry that doesn't comply with the requirements?

A data validation check enhances input quality by vetting the data and excluding any entry that doesn't adhere to predetermined criteria. For each record processed in a detail report, one or more lines of output are generated.

To know more about systems design visit:-

https://brainly.com/question/30067449

#SPJ4

a person’s social security number would be an example of a(n) ____________________ attribute.

Answers

single-valued is the answer you’re looking for:)

Which event will take place if there is a port security violation on switch S1 interface Fa0/1, as given below?* S1# show port-security Secure Port MaxSecureAddr CurrentAddr SecurityViolation Security Action (Count) (Count) (Count) Fal/1 2 0 0 restrict O A. A notification is sent B. A syslog message will be logged C. Packets with unknown source addresses won't be dropped O D. The interface will go into error-disabled state

Answers

Option C is correct, packets with unknown source will not be dropped.

What is an example of an error message?

The discrepancy between the measurement and actual values might be used to define an error. For instance, if both operators are using the same measurement tool. It's not required for both operators to produce a result that are similar.

If port security violation occurred then different error message generated.

Maximum no of  MAC(physical address) address supported is 50.

Here two(2) given.

Here  security Action is restrict

Here if MAC address is out of range then packet is dropped with unknown source. But in our case 2<50 is true.

So option C is true.

To know more about error message visit :

brainly.com/question/30225833

#SPJ4

Compute the variances in dollar amount and in percentage. (round to the nearest whole percent. ) indicate whether the variance is favorable (f) or unfavorable (u). Budgeted income amount $300. 00 actual amount $325. 0.

Answers

The variance is either favorable (f) or unfavorable (u) (u). The budgeted income is $300, but the actual income is $325. Dollar variance = 25, 8.33 percent variation and favorable (f)

The variance is unfavorable because the actual amount is less than the budgeted income amount (u).

We compute the dollar variance as follows:

Dollar variance = actual income minus budgeted income

Substituting the following values:

Dollar difference = 325-300 = 25

Finally, for the percentage calculation:

(dollar variance / budgeted income) x 100 = percent variance

percent variance= (25/300) x 100 = 0.08333x 100 = 8.33%

In probability theory and statistics, variance is defined as the expected squared deviation of a random variable from its population means or sample mean. Variance is a measure of dispersion, or how far apart a set of numbers is from their average value. Variance is important in statistics, and some ideas that use it include descriptive statistics, statistical inference, hypothesis testing, goodness of fit, and Monte Carlo sampling. A variance is an important tool in the sciences, where statistical data analysis is common.

Learn more about variance  here:

https://brainly.com/question/29803864

#SPJ4

8% is  the variances in dollar amount and in percentage.

What is Budget variance?

The accounting phrase "budget variation" refers to situations where actual expenses are either greater or lower than the baseline or anticipated costs.

                    A budget shortfall that may emerge as a result of under-reported revenues or underestimated costs is indicated by an unfavorable, or negative, budget variance.

Given,

       Budgeted income amount = $300

     Actual amount = $325

Since the budgeted amount is less than the actual amount, the variance is Favorable(F) .

We calculated the dollar variance as,

                          Actual amount - Budget amount

 Dollar amount = 325 - 300 = $25

  percentage variance as,

        Dollar variance/Budget variance  * 100

                                 =  25/300 * 100

                                  = 8.33 = 8%

Learn more about Budget variance

brainly.com/question/15570844

#SPJ4

Closing all routes of attack into an organization's system(s) is called ________.
A) defense in depth
B) comprehensive security
C) total security
D) access control

Answers

Through collaboration between the government, business owners, organizations, and individuals, comprehensive security aims to protect the essential societal functions (b).

Who is employed by comprehensive security?

Through their mutual understandings or formal agreements, several security services cooperate to improve the region's overall security. The United Nations are important in this sense. They have a unique security mechanism that they use.

What constitutes a comprehensive security program's components?

The three primary pillars of design, installation, and maintenance make up a thorough security management plan. Each of these stages is more effectively implemented when difficulties are prevented in the future. Additionally, it makes it simpler to identify problems' root causes when they do occur.

To know more about comprehensive security visit :-

https://brainly.com/question/30162939

#SPJ4

A(n) ____ is a piece of data required by an action in a macro.a. codeb. argumentc. messaged. pointer

Answers

A piece of information needed by a macro action is known as an argumentc macro. Positional,Keyword,Default,Mixed.

How does a macro pass an argument?

Any object, such as a button, shape, or picture, can have a macro that you feed arguments to it.  choose from the context menu,  as shown in the preceding . I made a button click.

What in C is a macro with an argument?

Like real functions, function-like macros can take parameters. You must include between the pair of parentheses in the  the macro function in order to if desired, whitespace, and must be valid .

To know more about argumentc macro visit:

https://brainly.com/question/17056494

#SPJ4

Which of the following is the correct way to open a file named users.txt in 'r' mode? A) infile = read ('users.txt', 'r') B) infile = readlines ('users.txt', r) C) infile = open('users.txt', 'r'). D) infile = open('r', users.txt)

Answers

The correct syntax is infile = open('users.txt', 'r') to open a file with the name users.txt in the 'r' mode.

When a file is opened in append mode, how should data be added to it?

Adding something to the end of another object is referred to as "appending." You can open a file in the "a" mode and add content to it. In order to add a new line, we can first open it in "a" mode (append), at which point we may call the write() method and supply the content we wish to append as an argument.

What will infile read () accomplish?

The entire file will be read in as a single text string using the infile. read() method. One line at a time will be read into infile using readline() (each time you call this command, it reads in the next line).

To know more about infile = open('users.txt', 'r') visit:

https://brainly.com/question/29990375

#SPJ4

when a piece of data is read from a file, it is copied from the file into the program.

Answers

The act of extracting data from data sources for further processing or archival is known as data extraction (data migration).

What is the read position of a file when it is first opened for reading?

The next item that will be read from a file is indicated by its read position. By default, when a file is first opened for reading, the read position of the file starts with the first character of the file.

The description of data when it is written to a file is?

The term "output file" refers to a file that contains data. The output file is produced on the disk and enables data writing by the software.

To know more about data extraction visit :-

https://brainly.com/question/28557568

#SPJ4

What will you include in your artist statement?

Answers

The following points must be included in your artist statement:

An explanation of your style, approach, philosophy, subject, and/or theme.A statement of your intention through your work.It's about the current direction of your work, not a history of how you got to this point.It all deals with the art, not about you or any other person.

What should an artist statement include?

An artist's statement must definitely include the process of creating the work and its history, overall vision, expectation, and relation to your previous work, along with patience.

There are three elements to consider: the “how,” the “what,” and the “why.” There should be enough information in your artist statement that someone can begin to imagine the art that you make without having it in front of them.

Therefore, the points that must be included in your artist statement are well described above.

To learn more about Artist's statement, refer to the link:

https://brainly.com/question/25988411

#SPJ1

How to write an IF statement for executing some code if "i" is NOT equal to 2?
Select one
O A. if (i <> 2)
O B. if i <> 2
O C. if (i != 2)
O D. if i = 2 then​

Answers

Under these circumstances, the code would never run: I mean, writing if s and else isn't that time-consuming. if (0) / 0 is.

How to write an if statement for executing some code if an is not equal to five?

In our programs, we frequently want to be able to "conditionally" execute certain actions, i.e., "if this is true, then do X, but if this other thing is true, then do Y." It's similar to how we dress when we get out of bed: "If it's sunny, I wear sunglasses, but if it's raining, I take an umbrella." In our programs, we can use if statements, if/else statements, and conditional expressions to do things conditionally.

If a condition is true, an if statement instructs the computer to run a certain piece of code. Only if x is bigger than 0 do we output a message in the following code:

To  know more about IF statement visit:-

https://brainly.com/question/29970955

#SPJ4

a control that combines the features of a text box and a list box is a ____.

Answers

The correct answer is combo box a control that combines the features of a text box and a list box.

A combination box consists of a text box and a list box. Users of this sort of control can enter own text in the control's text box or choose from a list of predetermined values. Until the user clicks the arrow adjacent to the box, the list is hidden. A list box is ideal when you wish to restrict input to items on the list, while a combo box is good when there is a list of suggested alternatives. There is a text box field in a combo box so that selections not on the list can be entered. When the DropDownStyle property is set to DropDownList, the rule does not apply.

To learn more about combo box click the link below:

brainly.com/question/9491099

#SPJ4

5 points Status: Not Submitted Let's make our first array! Make an array containing 2, 4, 6, 8, 10 and assign it to firstArray in the run method. Then print out the elements at index 1 and index 3. I 5.2.6 Our First Array Submit +Cc 1 public class FirstArray extends ConsoleProgram 2- { 3 4 public void run() { // Start here! } 5 hang in ON CO 7 }

Answers

The items at positions 1 and 3 should be printed. I 5.2.6 Our First Array Send +Cc to 1 public class ConsoleProgram is expanded by FirstArray

Program:

public class Scratchpad extends ConsoleProgram {

   public void run() {

       int[] test = {4, 7, 9, 7, 12};

       int[] result = findMultipleOfThree(test);

       System.out.println(Arrays.toString(result));

   }

   public static int[] findMultipleOfThree(int[] arr) {

       int length = arr.length;

       int[] result = new int[length];

       for (int i = 0; i < arr.length; i++) {

           if (arr[i] % 3 == 0) {

               result[i] = arr[i];

           }

       }

       return result;

   }

}

What does Java's ConsoleProgram mean?

We designed the ConsoleProgram library to make standard input and output in Java simpler. You can view ConsoleProgram's source code and use in this section.

How should a console application be written?

Select Create a new project in the Start window after starting Visual Studio. Select All languages in the Create a new project window, and then pick C# from the dropdown list. Select Windows from the list of all platforms, and then select Console from the list of all project kinds.

To know more about ConsoleProgram visit:-

https://brainly.com/question/29754309

#SPJ4

in a(n) _____ network, information flows to and from one central member of the group.

Answers

In a wheel network, information move to and from one central member of the group.

What is wheel network?

A wheel network is define as a kind of network which is found in a variety of teams, groups, and organizations. It is belong to a type of centralized structure of communication which allows information to flow downward, from managers to employees. This form of communication involves of one leader that directs the group. In short, wheel network is a network system that has single authority that control all the employees that working under him/her. The disadvantage of this system is if the leader has a lack of capability of his/her position.

Learn more about wheel network

https://brainly.com/question/29764483

#SPJ4

A _____ is an area of memory set aside to hold data read from a file or database.a. wormb. firewallc. cookied. buffer

Answers

The right response is d. A memory space designated as a buffer is used to store data read from a file or database.

Data is temporarily stored in buffer memory, a section of main memory (RAM), while it is being transmitted between two or more devices or between an application and a device. Different data transfer speeds between the transmitter and recipient are compensated for by buffering. A buffer is a short-term storage space, often a block of memory, where data is kept while it waits to be transmitted from or to an output device. It primarily functions as an input/output process. Data is temporarily stored in a memory region known as a buffer while it is being moved from one place to another. A buffer is used to transport data between computer operations.

To learn more about buffer click the link below:

brainly.com/question/13090767

#SPJ4

A physical star topology consists of several workstations that branch off a central device called a(n) __________.

Answers

In star topology, every peripheral node (computer workstation or any other peripheral) is connected to a central node called a hub or switch.

What is star topology?

Star topology is a network topology in which each network component is physically connected to a central node such as a router, hub or switch.

In a star topology, the central hub acts like a server and the connecting nodes act like clients. When the central node receives a packet from a connecting node, it can pass the packet on to other nodes in the network. A star topology is also known as a star network.

Star topologies are often used in home networks. The benefits of a star network topology include the following:

Limits the impact of a single point of failure. In star networks, each connecting node is isolated from other connecting nodes. If one connecting node goes down, it will not impact the performance of other connecting nodes in the network.Facilitates adding or removing individual components to and from a network. Star networks are usually kept small because network performance can suffer when too many devices compete for access to the central node.

To learn more about star topology refers to;

https://brainly.com/question/14726938

#SPJ4

Other Questions
What is the most effective method used in controlling pests? Which best describes a political party?a group with different beliefs about governmentgroups with the same beliefs about governmenta group with shared beliefs not about government With regard to socially responsible behavior, American businesses are Multiple Choice O demanding socially responsible behavior from international suppliers, particularly in the areas of environmental standards and human rights Issues O holding international supporto different standards than American companies must adhere to in the United States O not concerned with the ethical or socially responsible behavior of their international suppliers .O demanding that international suppliers adhere to higher, more costy standards than the American counterparts ________ represent(s) the largest source of unregulated hazardous waste. the present value of a $10,000, 5-year bond, will be less than $10,000 if theA) contractual interest rate is less than the market interest rate. B) contractual interest rate is greater than the market interest rate. C) bond is convertible. D) contractual interest rate is equal to the market interest rate. Question: In the debate, where Do you see James Baldwin and William F. Buckley engaging in critical reflection?The video is called: James Baldwin vs William F Buckley: A Legendary debate from 1965 Which property of concave mirror is used in telescope? The balance in the Accumulated Depreciation account represents the amount to be deducted from the cost of the plant asset to arrive at its fair market value. cash fund to be used to replace plant assets. amount charged to expense in the current period. amount charged to expense since the acquisition of the plant asset. Click if you would like to Show Work for this question: Qen Show Work Equipment with a cost of $355000 has an estimated salvage value of $15000 and an estimated life of 4 years of 10000 hours. It is to be depreciated by the straight line method, what is the amount of depreciation for the first full year during which the equipment was used for 2000 hours? $85000 $68000 $86250 $88750. Click if you would like to show Work for this question: een Show Work On October 1, 2022, Carla Vista Co places a new asset into service. The cost of the asset is $85000 with an estimated 5 year ife and $22000 salvage value at the end of its useful What is the depreciation expense for 2022 if Carla Vista Co. uses the straight-line method of depreciation? $8500 $3150 $17000 $4250 The calculation of depreciation using the declining-balance method multiplies a declining percentage times a constant book value. multiplies a constant percentage times the previous year's depreciation expense. yields an increasing depreciation expense each period. ignores salvage value in determining the amount to which a constant rate is applied. Sales taxes collected by a retailer are reported as expenses. current liabilities. contingent liabilities. revenues. If bonds are issued at a premium, the stated interest rate is too low to attract investors. higher than the market rate of interest. lower than the market rate of interest. adjusted to a higher rate of interest. Over the term of the bonds, the balance in the Discount on Bonds Payable account will decrease. increase be unaffected until the bonds mature fluctuate up and down if the market is volatile. A measure of a company's solvency is the asset turnover ratio. times interest earned. acid-test ratio. current ratio. Cullumber Company purchased a building on January 2 by signing a long-term $4154000 mortgage with monthly payments of $38200. The mortgage carries an interest rate of 10 percent. The amount owed on the mortgage after the first payment will be $4150500 $4125800. $4129300. $4164000 Click if you would like to Show Work for this question Which of the following show the proper effect of a SUCK Spil au d BUN UTVIUCH Item Stock Split Stock Dividend Par value per share Decrease No change Total paid-in capital Increase Increase Total retained earnings Decrease Decrease Total par value (common) Decrease Increase Substitutes means goods that can replace each other to some extent, so that a rise in the price of one good leads to a lower quantity consumed of another good, and vice versa. true false Does the environment affect the soil?(1 point)ResponsesYes, but it only affects its particle size.Yes, but it only affects its particle size.No, because soil type is determined only by particle size.No, because soil type is determined only by particle size.Yes, it affects particle size and soil composition.Yes, it affects particle size and soil composition.No, because soil is the same in all environments. What is cross cutting in operational coordination? What are the four main functional areas in the NIMS ICS framework? The _____ is a company wide consumer orientation with the objective of achieving long-run success.a.marketing myopiab.exchange processc.marketing conceptd.seller's market A bus of mass 2500 kg goes round a corner of radius 50 m at a speed of 5 m/s. What force is needed for the bus to go round the corner? Can you think of any other fictional monsters that might have been inspired by real-world parasites? Describe that monster and its parasitic behavior.Which of the parasite behaviors was most disturbing to you? Why?Imagine you are designing a movie or video game monster based off the mind-controlling hairworms. Describe how you would translate this real-world creature into a fictional monster. You can use elements of the other parasites discussed in the article and chapter. This week Sheniqua got a promotion at work that came with a 1 % pay increase. If now her monthly salary is $ 2575.5 , how much was she making before the raise? In a germ-line cell from a human male that is dividing, when do the X and Y chromosomes segregate? a. During mitosis b. During meiosis I, anaphase c. During meiosis II, anaphase d. They do not segregate; gametes contain a copy of X and a copy of Y. Which of the following was not a reason for the War of 1812?A. the belief that the British were stirring up Native Americans in the WestB. the impressment of American sailorsC. British attacks on settlements on the Canadian borderD. trade restrictions Memory schemas, or schemata, serve as representations of our _____ knowledge.a) semanticb) specificc) episodicd) innate How is the scientific law different for scientific theory?