answer.
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
kykrilka [37]
2 years ago
8

Assume the availability of a function called printStars. The function receives an integer value as an argument. If the argument

is positive, the function prints (to standard output) the given number of asterisks. Thus, if printStars(8) is called, ******** (8 asterisks) will be printed.
Assume further that the variable starCount has been declared and initialized to contain a positive integer value.

Write some code that prints starCount asterisks to standard output by:

first printing a single asterisk and no other characters then calls printStars to print the remaining asterisks.

Hint: Make sure to use the "end" option for print characters without the default newline, e.g. print("hello", end="")
Computers and Technology
1 answer:
In-s [12.5K]2 years ago
4 0

Answer:

a i just did it

Explanation:

You might be interested in
Write MVCTester.java. When the program starts, the initial screen displays a button labeled "add", a blank text area, and a text
Debora [2.8K]

Answer:

Kindly note that, you're to replace "at" with shift 2 as the brainly text editor can't take the symbol

Explanation:

import java.awt.event.*;  

import java.awt.geom.Area;

import javax.swing.*;

class MVCTester implements ActionListener{

JButton b; //button

JTextField t1; //textfiled

JTextArea area; //text area

MVCTester(){

JFrame f=new JFrame("Button Example");

//button

b=new JButton("add");  

b.setBounds(0,0,125,27);  

f.add(b);  

b.addActionListener(this);  

//textfiled

t1=new JTextField();  

t1.setBounds(0,161,125,24);  

f.add(t1);

//textarea

area=new JTextArea();  

area.setBounds(0,28,123,130);  

f.add(area);

area.setColumns (17);

area.setLineWrap (true);

area.setWrapStyleWord (false);

f.setSize(125,225);

f.setLayout(null);  

f.setVisible(true);

}

"at"Override

public void actionPerformed(ActionEvent arg0) {

Control c=new Control(area,t1,b);

}  

}  

class Control {

Control(JTextArea area,JTextField t1,JButton b){

//simple logic getting text of text area adding text of textfiled and setting the text to text area

area.setText(area.getText()+t1.getText()+"\n");

t1.setText("");

}

}

public class Modal{

public static void main(String[] args) {  

MVCTester be=new MVCTester();

}

}

8 0
2 years ago
Read 2 more answers
Miles to track laps One lap around a standard high-school running track is exactly 0.25 miles. Write a program that takes a numb
fredd [130]

Answer:

Explanation:

#include <iostream>

using namespace std;

//This is the function in the next line

double MilesToLaps(double userMiles) {

double Laps;  

Laps = userMiles * 4;

return Laps

}

//This is the main fucnction

int main(){

double Miles, FinLap;

cout << "Enter the number of miles " << endl;

cin>>Miles;

FinLap = MilesToLaps(Miles);

cout << "The number of laps ran is: "<<setprecision(2)<<Finlap<<endI;

}

3 0
2 years ago
Read 2 more answers
1. Discuss why it is so important for all application builders to always check data received from unknown sources, such as Web a
Ivan

Answer:

1. It is so important for all application builders to always check data received from unknown sources before using that data. This is because of the Security related reasons and vulnerabilities .For example the data received might contain harmful hidden viruses.  Web applications are accessed by internet and these are the most vulnerable to attacks by hacker or intruders using harmful data containing malware. This can cause security breaches due to the security flaws or bugs in Web applications. So to overcome such security risks which can cause damage in the Web applications, data from unknown sources should be checked.

Explanation:

2. When the Website is being used and running, there is a room for possible glitches or other bugs and issues. To understand, handle and address  issues successfully, the website operators carefully and consistently patch and configure their systems. The administrators collect the user data which enables them to have enough data in order to make the requisite alterations or improvements in the website. This also helps to improve the website performance. The patching and configuring of systems fix problems in the website which reduces the risk of website damage and the website works smoothly this way. Moreover it identifies vulnerabilities, solve configuration issues and upgrades in website features provide additional capabilities to the website.

8 0
2 years ago
In the range D5:D9 on all five worksheets, Gilberto wants to project next year's sales for each accessory, rounded up to zero de
Maksim231197 [3]

Answer:

Enter the following in D5:

=ROUNDUP((SUM(B5,B5)*C5),0)

Explanation:

Required

Add up B5 and B5, then multiply by C5.

Save result rounded up to 0 decimal places in D5

The required computation can be represented as:

D5 = (B5 + B5) * C5 <em>[Approximated to 0 decimal places]</em>

In Excel, the formula is:

=ROUNDUP((SUM(B5,B5)*C5),0)

Analyzing the above formula:

= ---> This begins all excel formulas

ROUNDUP( -> Rounds up the computation

(SUM(B5,B5) ---> Add B5 to B5

*C5) --> Multiply the above sum by C5

,0) ---> The computation is rounded up to 0 decimal places

To get the formula in D6 to D9, simply drag the formula from D5 down to D9.

The resulting formula will be:

=ROUNDUP((SUM(B6,B6)*C6),0)

=ROUNDUP((SUM(B7,B7)*C7),0)

=ROUNDUP((SUM(B8,B8)*C8),0)

=ROUNDUP((SUM(B9,B9)*C9),0)

8 0
2 years ago
You are modeling a small part of an online flight reservation system, according to the following description. A flight is a sing
Law Incorporation [45]

Answer:

Explanation:

The database schema can have following tables:

1. airport_table(apcode, apcity, apcountry)

2. airline_table(aid, aname, acountry)

3. flight_table(fid, aid, arrtime, depttime)

4. passenger_table(pid, pname, pcity, pcountry)

5 booking_table(bid, bdate, pid)

See attachment for the diagram

4 0
2 years ago
Other questions:
  • Problem statement: Using loop, write a program that will ask the user to enter a character for left or right. Then, the user wil
    13·1 answer
  • The elements in a string type array will be initialized to ____.?
    10·1 answer
  • Suppose a digital camera has a storage capacity of 256mb. how many photographs could be stored in the camera if each consisted o
    8·1 answer
  • 1A network administrator notices that some newly installed Ethernet cabling is carrying corrupt and distorted data signals. The
    5·1 answer
  • Which one of the following is the best example of an authorization control? (a)- Biometric device (b)- Digital certificate (c)-A
    11·1 answer
  • Give a proof for each statement.
    13·1 answer
  • Implement a class MyInt() that behaves almost the same as the class int, except when trying to add an object of type MyInt. Then
    11·1 answer
  • 2) Complete the get_num_of_characters() function, which returns the number of characters in the user's string. We encourage you
    11·1 answer
  • Multiply each element in origList with the corresponding value in offsetAmount. Print each product followed by a semicolon (no s
    14·1 answer
  • #Write a function called "replace_all" that accepts three #arguments: # # - target_string, a string in which to search. # - find
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!