1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sholpan [36]
3 years ago
5

import java.util.Scanner; public class StudentScores { public static void main (String [] args) { Scanner scnr = new Scanner(Sys

tem.in); final int SCORES_SIZE = 4; int[] oldScores = new int[SCORES_SIZE]; int[] newScores = new int[SCORES_SIZE]; int i; for (i = 0; i < oldScores.length; ++i) { oldScores[i] = scnr.nextInt(); } /* Your solution goes here */ for (i = 0; i < newScores.length; ++i) { System.out.print(newScores[i] + " "); } System.out.println(); } }
Computers and Technology
1 answer:
Delvig [45]3 years ago
4 0

Answer:

The code at 'Your solution goes here' is in the bold font given

Explanation:

import java.util.Scanner;

public class StudentScores {

   public static void main(String[] args) {

       Scanner scnr = new Scanner(System.in);

       final int SCORES_SIZE = 4;

       int[] oldScores = new int[SCORES_SIZE];

       int[] newScores = new int[SCORES_SIZE];

       int i;

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

           oldScores[i] = scnr.nextInt();

       }

       for (i = 0; i < oldScores.length - 1; ++i) {

           newScores[i] = oldScores[i+1];

       }

       newScores[oldScores.length-1] = oldScores[0];

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

           System.out.print(newScores[i] + " ");

       }

       System.out.println();

   }

}

You might be interested in
. Consider the problem of finding the largest element in a list of n elements. What will be the basic operation of an algorithm
natali 33 [55]

Answer:

Comparison.

Explanation:

When we have to find a largest in a list of n elements.First we have to iterate over the list so we can access all the elements of the list in one go.Then to find the largest element in the list we have to initialize a variable outside the loop with the minimum value possible and in the loop compare each element with this value,if the element is greater than the variable assign the element to the variable.Then the loop will find the largest element and it will be the variable.

4 0
3 years ago
One or more messages about the same topic is a ?
elena55 [62]

Answer:

This is the case of redundancy or the repeated data. It means that the same data is being repeated again and again. And its the wastage of time and memory both. The redundancy must be removed in all circumstances. However, we cannot as without it proper normalization of data is not possible.

Explanation:

The answer is self explanatory.

6 0
3 years ago
Implement the following logic in C++, Use appropriate data types. Data types are represented as either numeric (num) or string.
ICE Princess25 [194]

Answer:

Follows are the modified code in c++ language:

#include<iostream>//header file

#include<string>//header file

using namespace std;

int main()//main method

{

string name,address, MSG_YES, MSG_NO;//defining string variable

int item,quantity,size=6, i=0;//defining integer variable

double price;//defining double variable  

int VALID_ITEM[]={106,108,307,405,457,688};//defining integer array and assign value

double VALID_ITEM_PRICE[]={0.59,0.99,4.50,15.99,17.50,39.00};//defining double array and assign value

bool foundIt=false;//defining bool variable  

MSG_YES="Item available";//use string variable to assign value

MSG_NO = "Item not found"; //use string variable to assign value

cout<<"Input name: ";//print message

cin>>name;//input value in string variable

cout<<"Input Address: ";//print message

cin>>address;//input value in string variable

cout<<"Input Item: "<<endl;//print message

cin>>item;//input value in string variable

cout<<"Input Quantity: "<<endl;//print message

cin>>quantity;//input value in string variable

while(i <size)//defining while that checks i less then size  

{

if (item ==VALID_ITEM[i]) //use if block to match item in double array

{

foundIt = true;//change bool variable value

price = VALID_ITEM_PRICE[i];//hold item price value in price variable  

}

i++;//increment the value of i

}

if (foundIt == true)//use if to check bool variable value equal to true

{

cout<<MSG_YES<<endl;//print value

cout<<"Quantity "<<quantity<<" at "<<"Price "<<price<<"each"<<endl;//print value

cout<<"Total"<<quantity*price;//calculate the total value

}

else//else block

cout<<MSG_NO;//print message  

}

Output:

please find the attached file.

Explanation:

In the above given C++ language modified code, four-string variable " name, address, MSG_YES, and MSG_NO", four integer variable "item, quantity, size, and i", and "integer and double" array is defined, that holds values.

In the string and integer variable "name, address, and item, quantity", we input value from the user-end and use the while loop, which uses the if block to check the "item and quantity" value from the user end and print its respective value.

6 0
3 years ago
Illustrate why Sally's slide meets or does not meet professional expectations?
givi [52]

The correct answer to this open question is the following.

Unfortunately, you did not provide any context or background about the situation of Sally and the problem with her slides. We do not know it, just you.

However, trying to be of help, we can comment on the following general terms.

When someone does not meet professional expectations, this means that this individual did not prepare her presentation, lacked technical skills, did not included proper sources, or missed the proper visual aids to make the presentation more attractive and dynamic.

What Sally can improve about her slides is the following.

She can design a better structure for the presentation to have more congruence.

Sally has to clearly establish the goal or goals for her presentation.

She has to add many visuals instead of plain text. This way she can better capture the interest of her audience.

If she can use more vivid colors instead of pale or dark ones, that would be best.

No paragraphs unless necessary. She better uses bullet points.

Take care of the tone of her voice. During her practice, she can record her vice to check how it sounds.

5 0
2 years ago
Which of these purchases is most likely to be paid for with a credit card
Vesna [10]

Answer:

plane ticket?

Explanation:

7 0
3 years ago
Other questions:
  • Chris needs to modify the default bullets that are used in a nonnumbered list in word. Which method should he use?
    9·2 answers
  • An idea concerning what will happen in the future. (Crossword)
    9·1 answer
  • 12. When trying to identify the sorted column in a table, you would look for the column where A. an arrow is displayed in the fi
    10·2 answers
  • What is a benefit of the Name Manager feature?​
    12·2 answers
  • A blue NFiPA label indicates: A) Health Hazard B) Special information C) Flammability D) Reactivity
    6·2 answers
  • What is the second stage of information processing cycle​
    10·2 answers
  • A driver that approaches a controlled intersection with a signal that is not working must:
    12·1 answer
  • Choose the answer.
    13·2 answers
  • Which statement is true of the digital sound produced by a computer using a<br> lower sample rate?
    9·1 answer
  • Write a program that first reads a list of 5 integers from input. Then, read another value from the input, and output all intege
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!