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
Setler [38]
3 years ago
13

Assume that printStars is a function that takes one argument and returns no value. It prints a line of N stars (followed by a ne

wline character) where N is the value of the argument received. Write a statement that invokes printStars to make a line of 35 stars.
Computers and Technology
1 answer:
trasher [3.6K]3 years ago
7 0

Answer:

printStars(35);

Explanation:

public class Question {

   public static void main(String args[]) {

     printStars(35);

   }

   public static void printStars(int numberOfStars){

       for(int i = 1; i <= numberOfStars; i++){

           System.out.print("*");

       }

       System.out.print("\n");

   }

}

You might be interested in
Which is the most efficient way to make a row of text bold in every worksheet in a file?
astra-53 [7]
You have to highlight the text and then click the bold B

6 0
3 years ago
Read 2 more answers
The basic commands that a computer performs are ____, and performance of arithmetic and logical operations.
bogdanovich [222]

Answer:

input, output, and storage.

Explanation:

The computer is an electronic device which is getting the input from the user i.e from the keyboard, store the data from the secondary storage such as hard disk, pen drive, etc and giving the output on the screen i.e on the Monitor  

  • All the arithmetical and logical operation are performed by the computer system .    
  • The input, output, and storage are the components of the computer system.
6 0
3 years ago
1. Give state diagrams of DFAs recognizing the following languages. The alphabet is {0, 1}. (a) {w | w is any string except 11 a
storchak [24]

Answer:

Explanation:

The first diagram shows the DFA that accepts that accepts any string except 11 and 111

The second diagram shows every odd position of w is 1

6 0
3 years ago
Grade Average Lab Assignment Purpose: The goal of this lab assignment is to learn how to use for loops and if/else commands. Wri
miss Akunina [59]
<h2>Answer:</h2><h2></h2>

//class to test the Grade class

public class GradeTest{

    public static void main(String []args){        

       //create the grades to be averaged

      double [] grades = {23, 45, 67, 12.6};

       

       //create an object of the Grade class and

       //pass in the necessary arguments to the constructor

       Grade grade = new Grade("John", grades);

       

       //print out the results from the Grade object.

       System.out.println("Your name is " + grade.getName());

       System.out.println("Your average score is " + grade.getAverage());

       System.out.println("Your letter grade is " + grade.getLetterGrade());

       

   }

}  //End of the GradeTest class

//The Grade class

class Grade {

   

   //create instance variables

   private String name;

   private double [] grades;

   

   //constructor for the class

  public Grade(String name, double [] grades){

       

       //initialize the instance variables

      this.name = name;

       this.grades = grades;

       

   }

   

   //method to return the name of the student

  public String getName(){

       //return the name

       return this.name;

   }

   

   

   //method to calculate the average of the grades

  public double getAverage(){

       

       double [] grades = this.grades;

       

       //initialize some needed variables

       double sum = 0;

       double average = 0;

       

       //loop through the grades array and add each element to the sum variable

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

           sum += grades[0];    

       }

       

       //calculate the average

      average = sum / grades.length;

       

       //return the average grade

       return average;

     

   }

   

   

   //method the calculate the letter grade from the average

   public char getLetterGrade(){

       

       //initialize some variables

      double average = this.getAverage();

       char letterGrade;

       

       //check the average and determine its corresponding letter grade

       if(average >= 40 && average < 45){

           letterGrade = 'E';

       }

       else if(average >= 45 && average < 50){

           letterGrade = 'D';

       }

       else if(average >= 50 && average < 60){

           letterGrade = 'C';

       }

       else if(average >= 60 && average < 70){

           letterGrade = 'B';

       }

       else if(average >= 70 && average <= 100){

           letterGrade = 'A';

       }

       else {

           letterGrade = 'F';

       }

       //return the letter grade

       return letterGrade;

       

   }

   

}   //End of the Grade class

<h2>Sample Output:</h2>

Your name is John

Your average score is 23.0

Your letter grade is F

<h2>Explanation:</h2>

The code above is written in Java and it contains comments explaining important parts of the code. It also contains a sample output got from running the program. To run this on your machine, copy the code and save in a file named GradeTest.java

3 0
3 years ago
Which generation of programming languages provides programmers with a visual environment for coding programs?
Andreyy89

5GL or the fifth-generation language is programming that uses a visual or graphical development interface to create source language that is usually compiled with a 3GL or 4GL language compiler.  Fifth Generation Programming or Visual programming language, is also known as natural language. It provides a visual or graphical interface, called a visual programming environment, for creating source codes.

6 0
3 years ago
Other questions:
  • SOMETHING WRONG WHAT WRONG!!!!!!!
    15·2 answers
  • Once a graph has been created, you would need to start over to make any changes to it. true false
    15·1 answer
  • Write two statements to read in values for my_city followed by my_state. Do not provide a prompt. Assign log_entry with current_
    13·1 answer
  • How do you begin typing a table cell
    8·1 answer
  • Which of the following is true of OEMs?
    10·1 answer
  • Sam plans to use this image in artwork for a brochure about airplanes. Which principles of page layout is Sam planning to use in
    11·1 answer
  • PLEASE HELP I WILL GIVE BRAINLIEST!!
    8·1 answer
  • Firestick optimizing system storage and applications loop
    12·1 answer
  • Can’t be opened because apple cannot check it for malicious software.
    15·1 answer
  • What type of block start a sequence?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!