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
aleksandrvk [35]
2 years ago
14

Which set of variables will make code easier to understand?

Computers and Technology
1 answer:
Alecsey [184]2 years ago
8 0

Answer:

sum, price, count

Explanation:

Programmers should use significant names for the variables.

Not only it makes it easier for them to remember what kind of information is stored in each variable, but it also makes life simpler for anyone who would read the code later.

Names like sum, price and count are significant names ( assuming they actually hold this kind of data), and will make the re-reading of the program code much easier.

You might be interested in
Given 4 integers, output their product and their average, using integer arithmetic.
solmaris [256]

Answer:

see explaination

Explanation:

Part 1:

import java.util.Scanner;

public class LabProgram {

public static void main(String[] args) {

Scanner scnr = new Scanner(System.in);

int num1;

int num2;

int num3;

int num4;

int avg=0, pro=1;

num1 = scnr.nextInt();

num2 = scnr.nextInt();

num3 = scnr.nextInt();

num4 = scnr.nextInt();

avg = (num1+num2+num3+num4)/4;

pro = num1*num2*num3*num4;

System.out.println(pro+" "+avg);

}

}

------------------------------------------------------------------

Part 2:

import java.util.Scanner;

public class LabProgram {

public static void main(String[] args) {

Scanner scnr = new Scanner(System.in);

int num1;

int num2;

int num3;

int num4;

double avg=0, pro=1; //using double to store floating point numbers.

num1 = scnr.nextInt();

num2 = scnr.nextInt();

num3 = scnr.nextInt();

num4 = scnr.nextInt();

avg = (num1+num2+num3+num4)/4.0; //if avg is declared as a float, then use 4.0f

pro = num1*num2*num3*num4;

System.out.println((int)pro+" "+(int)avg); //using type conversion only integer part

System.out.printf("%.3f %.3f\n",pro,avg);// \n is for newline

}

}

8 0
2 years ago
1. Jesse wants a recommendation about creating an SCR help desk. She said that I can find lots of information about help desks o
OLEGan [10]

Answer:

The recommendations for Jesse about creating an SCR help desk are, the user interface, sending of data request to servers, sending data files back to the server, receiving  data files from the server, running an application programs locally to process data.

File server handles several jobs which includes, sending data files to client, storing of data files, and generating traffic on the internet.

The client/server tiers  allows user interface on the client and data can be stored on the server. it's elements includes the following: output, input, processes, performance, control and security

Explanation:

Given that:

(1)The recommendations is stated as follows:

A file sharing architecture is recommended where the clients can handle the following:

  • The user interface
  • Sends data request to servers
  • Sends data files back to the server
  • Receives data files from the server
  • Runs application programs locally to process data

The file server handles the following tasks or jobs which is stated below:

  • Receives data request from clients
  • Sends data files to client
  • Stores data files
  • Manage multi-user access
  • Generate LAN traffic

The Client design:

  • Lower  network traffic
  • Faster performance
  • Lower initial cost
  • Lower maintenance cost

The disadvantage of this, is that it is more difficult to design

Note: Kindly find an attached copy of part of the solution to this given question below

4 0
2 years ago
Write a function nexthour that receives one integer argument, which is an hour of the day, and returns the next hour. This assum
Alexandra [31]

COMPLETE QUESTION:

Write a function nexthour that receives one integer argument, which is an hour of the day, and returns the next hour. This assumes a 12-hour clock; so, for example, the next hour after 12 would be 1. Here are two examples of calling this function.

>> fprintf('The next hour will be %d.\n', nexthour(3))

the next hour will be 4

>> fprintf('The next hour will be %d.\n', nexthour(12))

the next hour will be 1

Answer:

The following CODE in MATLAB will accomplish this

<em>>> nexthour = input('Please enter a time here: ');</em>

<em>if (nexthour >= 1) && (nexthour< 12)</em>

<em>nexthour = nexthour+ 1</em>

<em>elseif (nexthour == 12)</em>

<em>nexthour = 1</em>

<em>else </em>

<em>disp('You entered an invalid time')</em>

<em>end</em>

Explanation:

In the Matlab code above, the input function is used to receive a value for time in hours (1-12) next we use the if statement to check that the time entered is between 1 and 11 and add 1 as the next hour, else if the value entered is 12, we assign 1 as the next hour. For every other inputs an error message is displayed.

4 0
2 years ago
The database structure in a dbms is stored as a _____.
Colt1911 [192]
This will be stored as a collection of files
6 0
2 years ago
Q.No.3. A filling station (gas station) is to be set up for fully automated operation. Drivers swipe their credit card through a
scZoUnD [109]

Answer:

Following are the 5 problems, that can arise in this scenario:

Explanation:

  • When the driver swipes its credit or debit card, its connection with both the card company could not be formed due to the poor or ineffective development, therefore the driver may not put any fuel from its vehicle.  
  • It still wants to spend energy even after the card is read as incorrect.  
  • So, its total price to just be debited from the credit or debit card shall be much more and less than the real cost as well as the deduction of both the fuel should be overestimated.  
  • Its information may not adjust when a driver uses its device because the next driver could no matter how long only use the device.
  • Its fuel limit to also be established when the vehicle has stopped its card would be faulty as well as a certain restriction would not cause its device to be misused.
3 0
2 years ago
Other questions:
  • Row array gameScores contains all player scores. Construct a row array highScores than contains all player scores greater than m
    15·1 answer
  • Select the examples that best demonstrate likely employers for Journalism and Broadcasting workers. Check all that apply.
    11·2 answers
  • The kings and queens of England are listed in a relation Kings(name,nickname,house,beginReign,endReign). Their name is unique, e
    8·1 answer
  • Write an if-else statement to describe an integer. Print "Positive even number" if isEven and is Positive are both true. Print "
    14·1 answer
  • A company moves a popular website to a new web host. Which of the following will change as a result?
    15·1 answer
  • Drag each tile to the correct box.
    8·2 answers
  • In this problem, we want to compare the computational performance of symmetric and asymmetric algorithms. Assume a fast public-k
    11·1 answer
  • Modify the closest pair of points algorithm so that the separating line L now separates the first n/4 points (sorted according t
    14·1 answer
  • Identify a data type applied in an input element to create slider controls.
    13·1 answer
  • A regional bank implemented an automated solution to streamline their operations for receiving and processing checks/cheques. Th
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!