SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TO BE WRITTEN IN
JAVA.
• Assume that the classes listed in the Java Quick Reference have been imported where appropriate.
• Unless otherwise noted in the question, assume that parameters in method calls are not null and that methods are called only when their preconditions are satisfied.
• In writing solutions for each question, you may use any of the accessible methods that are listed in classes defined in that question. Writing significant amounts of code that can be replaced by a call to one of these methods will not receive full credit.
A manufacturer wants to keep track of the average of the ratings that have been submitted for an item using a running average. The algorithm for calculating a running average differs from the standard algorithm for calculating an average, as described in part (a).
A partial declaration of the RunningAverage class is shown below. You will write two methods of the RunningAverage class.
*
public class RunningAverage
{
}
/** The number of ratings included in the running average. private int count;
/** The average of the ratings that have been entered. */ private double average;
// There are no other instance variables.
/** Creates a RunningAverage object.
* Postcondition: count is initialized to 0 and average is
* initialized to 0.0.
*/
public RunningAverage()
{ /* implementation not shown */ }
/** Updates the running average to reflect the entry of a new
* rating, as described in part (a).
*/
public void updateAverage (double newVal)
{ /* to be implemented in part (a) */ }
/** Processes num new ratings by considering them for inclusion
* in the running average and updating the running average as
necessary. Returns an integer that represents the number of
*
* invalid ratings, as described in part (b).
* Precondition: num > 0
*/
public int processNewRatings (int num)
{ /* to be implemented in part (b) */ }
/** Returns a single numeric rating.
public double getNewRating()
{ /* implementation not shown */ }
(a) Write the method updateAverage, which updates the RunningAverage object to include a new rating. To update a running average, add the new rating to a calculated total, which is the number of ratings times the current running average. Divide the new total by the incremented count to obtain the new running
average.
For example, if there are 4 ratings with a current running average of 3.5, the calculated total is 4 times 3.5, or 14.0. When a fifth rating with a value of 6.0 is included, the new total becomes 20.0. The new running average is 20.0 divided by 5, or 4.0.
Complete method updateAverage.
/** Updates the running average to reflect the entry of a new
* rating, as described in part (a).
*/
public void updateAverage (double newVal)
(b) Write the processNewRatings method, which considers num new ratings for inclusion in the running average. A helper method, getNewRating, which returns a single rating, has been provided for you.
The running average must only be updated with ratings that are greater than or equal to zero. Ratings that are less than 0 are considered invalid and are not included in the running average.
The processNewRatings method returns the number of invalid ratings. See the table below for three examples of how calls to process NewRatings should work.
Statement
Ratings
processNewRatings
Generated
Return Value
processNewRatings (2)

2.5, 4.5
processNewRatings (1)
-2.0
1
0.0,
-2.2,
processNewRatings (4)
2
3.5, -1.5
Comments
Both new ratings are included
in the running average.
No new ratings are included in the running average.
Two new ratings (0.0 and 3.5) are included in the running
average.
Complete method processNewRatings. Assume that updateAverage works as specified, regardless of what you wrote in part (a). You must use getNewRating and updateAverage appropriately to receive full
credit.
/** Processes num new ratings by considering them for inclusion
* in the running average and updating the running average as
*
necessary. Returns an integer that represents the number of
* invalid ratings, as described in part (b).
* Precondition: num > 0
*/
public int processNewRatings (int num)

Answers

Answer 1
It’s g zzzzzzzzzzzzzzzzzzzzzzzz

Related Questions

What is the method for combining permissions from different database objects?
Group of answer choices

1. database level

2. role

3. user

Answers

Database level is the method for combining permissions from different database objects.

What is database?The types of access given to particular secureables are called permissions. Permissions are given to SQL Server logins and server roles at the server level. They are assigned to database users and database roles at the database level.The three sorts of permissions that files and directories can have are read, write, and execute: A file's or directory's contents can be viewed by someone having read permission. The contents of a file can be changed by someone with write rights, including by adding, removing, or modifying file contents.The right or permission to access a named object in the recommended way, such a table access authorization. A specific user's connection to the database may be permitted by privileges.

To learn more about database refer to:

https://brainly.com/question/518894

#SPJ1

Database level is the method for combining permissions from different database objects.

What is database?Permissions are the many sorts of access that are granted to specific secureables. At the server level, permissions are assigned to SQL Server logins and server roles. At the database level, they are assigned to database users and database roles.Read, write, and execute are the three types of permissions that files and directories can have. Anyone with read permission can view the contents of a file or directory. Anyone with write access can edit, add, or remove data from a file, among other file-related operations.the capability or authorization to make a recommended access to a named object, like a table access authorization. Privileges may allow a specific user's connection to the database.

To learn more about database refer to:

brainly.com/question/518894

#SPJ1

Consider a 3x4 rectangular shape room. Four computers are located at the four
corners of the room. The HUB is placed on the center of the room. Calculate the
minimum length of cables required to connect the computers in a network in each of the
following topologies:
a) Bus topology
b) Ring topology
c) Star topology
d) Mesh topology

Answers

The minimum length of cables required to connect the computers in a network in each of the bus topology. Thus, option (a) is correct.

What is computers?

Computer is the name for the electrical device. In 1822, Charles Babbage created the first computer. The work of input, processing, and output was completed by the computer. Hardware and software both run on a computer. The information is input into the computer, which subsequently generates results.

According to givens the scenario was the justify are the 3×4 rectangular shape room there are the four computers are the set-up to the HUB is placed in the center of the room. The bus topology is the based on the networks are the subsequently.

As a result, the minimum length of cables required to connect the computers in a network in each of the bus topology. Therefore, option (a) is correct.

Learn more about on computers, here:

https://brainly.com/question/21080395

#SPJ2

17 Can you determine Lack of Encryption and Security Misconfiguration in an organisation?

Answers

It is possible for the person to determine the lack of Encryption and Security Misconfiguration in an organization.

What do you mean by Security misconfiguration?

Security misconfiguration may be defined as a type of security control that is significantly configured or left insecure inaccurately by putting your systems and data at risk. It may arise when essential security settings are either not implemented or implemented with errors.  

A lack of encryption and security misconfiguration is easily determined by the employees of an organization. It may cause a potential threat to the organization by stealing all its personal and confidential information that harms the whole institution or organization.

Therefore, it is possible for the person to determine the lack of Encryption and Security Misconfiguration in an organization.

To learn more about Security misconfiguration, refer to the link:

https://brainly.com/question/29095078

#SPJ1

help help help help....​

Answers

Answer:redo reload copy cut paste bullet list highlight bold numbered list center right left.

Explanation:

That's all I can help with right now

How computer networks help in storage capacity and volume

Answers

Answer:

Having a network of computers (especially a server) allows you to store things on the network instead of your own computer's drive.

Explanation:

A network is a grouping of computers. Some of these computers are usually servers, especially in medium-sized companies. An example is having a server unit (usually with something like an Intel Xeon processor, and with at least 64GB of RAM) with the main feature being mass storage. It's like your own personal cloud! You'll often see a couple of 10TB drives stashed into one. Everything anyone could need to access is on there, as well as everything they need to save. This really helps if you give your employees basic laptops for WFH.

As a cool anecdote, I have 5.5TB of storage and am using 90% of it. You can never have enough! The cost adds up too, with 2TB of typical Hard Drive storage being a $50 expense. With laptops, you usually need an external HDD, which is slightly more expensive. Hence, cloud/network.

What are the architectural features of the data storage system in each proposal

Answers

Answer:

Network storage architecture refers to the physical and conceptual organization of a network that enables data transfer between storage devices and servers. It provides the backend for most enterprise-level operations and allows users to get what they need

Explanation:

Explain the following :Union within structure union

Answers

Answer:

union with union structure

Explanation:

What does Power Query use to change to what it determines is the appropriate data type?

Answers

Answer:

Power Query reads the table schema from the data source and automatically displays the data by using the correct data type for each column. Unstructured sources Examples include Excel, CSV, and text files. Power Query automatically detects data types by inspecting the values in the table.

The Power Query is used in Excel. It is used to transfer data from other data sources like text, web or other workbooks.

What is a power query?

Power Query extracts the table schema from the data source and uses the appropriate data type for each column to automatically display the data. unorganized sources Excel, CSV, and text files are a few examples. By looking at the values in the table, Power Query automatically determines the data types.

Power Query automatically adds two phases to your query when this setting is enabled: Encourage column headings: increases the prominence of the table's first row as the column header. Changed type: Examines the values from each column before changing the data types of the Any data type values.

Therefore, Excel makes advantage of the Power Query. Data from other data sources, including text, the web, and other workbooks, are transferred using it.

To learn more about power query, refer to the link:

https://brainly.com/question/29756007

#SPJ2

A ____ risk assessment evaluates threats to and vulnerabilities of the network.

Answers

Answer:

Vulnerability

Explanation:

Vulnerability refers to a weakness in your hardware, software, or procedures

In reference to computers, what is a firewall?

A) letters, numbers, and special characters assigned to unlock accounts and websites
B) email attachments
C) an installed software element that protects and monitors incoming and outgoing data
D) a second copy of files saved to a cloud

Answers

Answer:

C) an installed software element that protects and monitors incoming and outgoing data

Explanation:

Someone gives me the idea to increase this title for my thesis MULTI PURPOSE COOPERATIVE AUTOMATED LENDING MANAGEMENT SYSTEM.

Answers

An idea to increase the title for the thesis is the function of MULTI PURPOSE COOPERATIVE AUTOMATED LENDING MANAGEMENT SYSTEM in a growing economy.

What kind of thesis assertions are there?

Thesis statements that explain something; those that make an argument and Statement of an analytical thesis.

You will use your research to support an assertion, or argument. A compelling thesis statement introduces the subject of the paper, summarizes the key points, and persuades the reader to keep reading.

Hence, Many thesis statements hint at what will happen in the essay in addition to outlining the argument to be presented. In order to help readers follow the writer's idea as it is developed, this serves as a "road map" for them.

Learn more about thesis from

https://brainly.com/question/14399092
#SPJ1

Implication if the intellectual property rights do not exist

Answers

Intellectual Property Rights (IPR) are  the creative rights over an original piece of work, invention or even an idea behind a business can come under the purview of Intellectual Property Rights Act.

Implication if the intellectual property rights do not exist

1.  Less research and development as nobody would reap benefits generated by their innovations.

2. Cultural and art vitality as they would not be made more according to their original work.

3. Job losses and economic issues as IPR helps in boosting both of these factors.

4. Healthcare and treatment would be at lost because of less innovation of useful vaccines.

5. Less emergence of startups with unique ideas, decline in innovative trade and a race backwards.

6. Counterfeiting of journals, research papers leading to a still situation.

Hence, these factors explain what would happen without IPR.

To know more about Intellectual property rights from the given link

https://brainly.com/question/24015145

#SPJ13

You are trying to automate the sales of a car sales and distribution company in the
Western Cape. The work was supposed to be completed by your predecessor, but he
was unable to perform this task as he had a short stint in this job. However, he had
divided this complex task into manageable tasks for you using arrays. Analyse the
input/output of the desktop application below and answer the questions that follow.
a) Write Java statements to declare an array that will store the total car sales
values (int) for each month of the year

Answers

Using the knowledge of the computational language in python it is possible to write a code that Write Java statements to declare an array that will store the total car sales values (int) for each month of the year

Writting the code:

import javax.swing.*;

import java.util.*;

public class Sales{

       public static void main (String[] args) {

           int max=1000000,min=100000;

           int carSales[]= new int[12];

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

              carSales[i]=(int)(Math.random()*(max-min+1)+min);

           String month[]={"January","February","March","April","May","June","July","August","September","October","November","December"};

           int maxSale=carSales[0],index=0;

           for(int i=1;i< carSales.length;i++)

           {

               if(carSales[i]>maxSale)

               {

                   maxSale=carSales[i];

                   index=i;

               }

           }

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

           JFrame f=new JFrame();

           JOptionPane.showMessageDialog(f,"Highest Sale Value is "+maxSale+" which occur in month of "+month[index]);

           String Jmonth[]=new String[3];

           int count=0;

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

           {

               if(month[i].charAt(0)=='J')

               {

                   Jmonth[count]=month[i];

                   count++;

               }

           }

           JList list = new JList(Jmonth);

           JPanel panel = new JPanel();

           panel.add(new JScrollPane(list));

           JOptionPane.showMessageDialog(null, panel);

       }

}

See more about JAVA at brainly.com/question/18502436

#SPJ1

1. Design and implement a class dayType that implements the day of the week in a program. The class dayType should store the day, such as Sun for Sunday. The program should be able to perform the following operations on an object of type dayType:

a. Set the day.
b. Print the day.
c. Return the day.
d. Return the next day.
e. Return the previous day.
f. Calculate and return the day by adding certain days to the current day. For example, if the current day is Monday and we add 4 days, the day to be returned is Friday. Similarly, if today is Tuesday and we add 13 days, the day to be returned is Monday.
Add the appropriate constructors.

2. Also, write a program to test various operations on this class .

Answers

Using the knowledge in computational language in C++ it is possible to write the code that design and implement a class dayType that implements the day of the week in a program.

Writting the code:

#include "stdafx.h"

#include<iostream>

#include<cmath>

sing namespace std;

class dayType

{

public: int presday;

int prevday;

int nextday;

dayType()

presday = 0;

nextday = 0;

prevday = 0;

}

void set(int day); //function declarations

void print(int day);

int Next_day(int day);

int day();

int prev_day(int pres);

};

void dayType::set(int day) //member functions

{

presday = day;

}

/* modify here*/

int dayType::prev_day(int day)

{

prevday = presday - day;// =abs(presday-day);

if (prevday<0)prevday += 7;

return prevday;

}

int dayType::day()

{

return presday;

}

int dayType::Next_day(int day)

{

nextday = presday + day;

if (nextday>7)

{

nextday = nextday % 7;

}

return nextday;

}

void dayType::print(int d)

{

if (d == 1)

cout << "Monday" << endl;

if (d == 2)

cout << "Tuesday" << endl;

if (d == 3)

cout << "Wednesday" << endl;

if (d == 4)

cout << "Thursday" << endl;

if (d == 5)

cout << "Friday" << endl;

if (d == 6)

cout << "Saturday" << endl;

if (d == 7)

cout << "Sunday" << endl;

}

/* here modify change void to int type */

int main()

{

int d, p, n;

dayType obj;

cout << "1-Mon" << endl << "2-Tue" << endl << "3-Wed" << endl << "4-Thur" << endl << "5-Fri" << endl << "6-Sat" << endl << "7-sun" << endl;

cout << "Enter Day";

cin >> d;

obj.set(d);

cout << "Present day is";

obj.print(d);

cout << "Enter number of days next";

cin >> d;

n = obj.Next_day(d);

cout << "Next day is";

obj.print(n);

cout << "Enter number of days previous";

cin >> d;

p = obj.prev_day(d);

cout << "previous day is";

obj.print(p);

system("Pause");

return 0;

}

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

#SPJ1

Which of the following is not used as an Internet security indicator?
A) shield icon
B) handshake icon
C) lock symbol
D) heart symbol

Answers

Internet security is not indicated by the shield icon.

What does "Internet security" mean?

A key element of cybersecurity is online security, which includes controlling risks and dangers posed by the Internet, online browsers, web apps, websites, and networks. Protecting consumers & corporate IT assets against online threats is the main objective of Online security systems.

What are the many methods of Internet security?

Access control, antivirus, security testing, network analytics, various forms of network-related safety (endpoint, online, wireless), firewalls, VPN encryption, and more are all included in network security.

To know more about Internet security visit:

https://brainly.com/question/27730901

#SPJ4

Answer:

it is A.

Explanation:

[SPECIAL]>>>WRITE THIS TEXT IN BINARY CODE

Answers

Answer: GET YOUR BONUS

in binary code

01000111 01000101 01010100 00100000 01011001 01001111 01010101 01010010 00100000 01000010 01001111 01001110 01010101 01010011

THX:

01010100 01001000 01000001 01001110 01001011 00100000 01011001 01001111 01010101

Answer:

01000111 01000101 01010100 00100000 01011001 01001111 01010101 01010010 00100000 01000010 01001111 01001110 01010101 0101001

You wrote a pseudocode outline of your program using comments. Which character do you use to indicate a line is a comment? O # O/ O& O"​

Answers

It depends on the coding language but assuming you’re studying Python the correct way to comment is with # symbol

PLEASE answer me quick its due tomorrow so please answer


- What is a Computer Network?

- What is the concept of Internet of things (IOT)?

- What are the elements of a Smart Object?

- Explain the the concept of Micro-Controller.

Answers

A computer network is a collection of computers that share resources that are located on or provided by network nodes. To interact with one another, the computers employ standard communication protocols across digital linkages.

The Internet of Things refers to physical items equipped with sensors, processing power, software, and other technologies that communicate and share information with other devices and processes over the Internet or other network infrastructure.

Sensors, microprocessors, storage systems, controls, programming, and embedded system software with enhanced user interface make up a smart object.

A microcontroller is a small integrated circuit that controls a single function in an embedded system. On a single chip, a typical microcontroller has a CPU, memory, and input/output (I/O) peripherals.

All the above are part of computer architecture.

What is computer architecture?

Computer architecture is a collection of principles and procedures used in computer engineering to explain the functioning, structure, and deployment of computer systems. A system's architecture refers to its structure in terms of individually stated components and their interrelationships.

The hardware, system software, and user layers comprise computer architecture.

Learn more about computer networks:
https://brainly.com/question/14276789
#SPJ1

Identify the type of error and correction in the following statement. double 4th3. where is the error ​

Answers

They use the knowledge of computational language in C++ it is possible to write a code Identify the type of error and correction in the following statement.

Writting the code:

#include <stdio.h>  

int main()  

{  

  int sum=0; // variable initialization  

  int k=1;  

  for(int i=1;i<=10;i++); // logical error, as we put the semicolon after loop  

  {  

      sum=sum+k;  

      k++;  

  }  

printf("The  value of sum is %d", sum);  

   return 0;  

}  

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

#SPJ1

Identification where Information Technology causes a hindrance to business processes

Answers

Identification where Information Technology causes a hindrance to business processes is one that is  Lacking an IT Plan.

Why is planning for information technology so crucial?

The organization's strategic goals and objectives may be achieved with the aid of this planning. The strategic IT plan should take into account how each of the organization's strategic business goals relates to technology as well as any modifications that will need to be made to the organization's information and communications infrastructure.

Note that So much so that a business will find it difficult to run efficiently without fully functional computers and access to emails and data. The consequences of data loss or corruption due to hardware failure, human mistake, hacking, or malware could be disastrous for any organization, it is a basic reality.

Learn more about Technology  from

https://brainly.com/question/25110079
#SPJ1

What is a privacy data breach

Answers

Answer: A privacy data breach occurs when personal information is stolen or lost or is collected, used or disclosed without authority. A privacy breach occurs when personal information is stolen or lost or is collected, used or disclosed without authority.

Explanation:

Examples of a  data breach might include:

Loss or theft of hard copy notes, USB drives, computers or mobile devices. an unauthorized person gaining access to your laptop, email account or computer network. sending an email with personal data to the wrong person.

What is output by the following code? Select all that apply.

c = 0
while (c < 11):
c = c + 6
print (c)

Answers

When the above code is entered into the Python online compilers and run, the output is 12.

What is an online compiler?

An online compiler is a technology that allows you to build and run source code in a variety of computer languages online. For program execution, an online compiler is required. It translates the text-based source code into an executable form known as object code.

The print() function sends the specified message to the screen or another output device. The message can be a string or another object that is converted to a string before being shown on the screen.

Hence, where:

c = 0

while (c < 11):

 c = c + 6

print (c)

Output = 12

Learn more about compilers:
https://brainly.com/question/27882492
#SPJ1

Probability Practice: Cass is interested in figuring out how many customers have applied for a home mortgage recently.

Review the data and calicut are the probability that if Cass runs into one of the financial institutions customers at random, that person has applied for a home mortgage this year.


What is the total number of customers?


How many customers applied for a home mortgage?

Answers

Answer:

Doesn't make a lot of sense. Can you be more specific.

Explanation:

What can help refine and narrow search results?
A) search strings
B) Boolean operators
C) algorithms
D) parentheses

Answers

The elements or features that can help refine and narrow search results are: B) Boolean operators.

What are Boolean operators?

Boolean operators can be defined as the specific words and symbols that are typically designed and developed to enable an end user in expanding or narrowing search parameters, especially when querying a database or search engine in order to generate focused and productive search results.

The types of Boolean operators.

In Computer technology, there are three (3) main types of Boolean operators and these include the following:

AND (multiplication)NOT (complementation)OR (addition)

In conclusion, a Boolean operator can help an end user in refining and narrowing his or her search results.

Read more on Boolean operator here: https://brainly.com/question/8897321

#SPJ1

Answer:

it is B.

Explanation:

Identify any two laws and explain their implications on the use of email in an organisation in terms of transmission of information via the Internet

Answers

The law of email is crucial. Email has been and continues to be a crucial tool for communication. While some people connect via social media, teamwork apps, and instant messaging, many people still use email, particularly for business.

What is about law of email?The law of email is crucial. Email has been and continues to be a crucial tool for communication. While some people connect via social media, teamwork apps, and instant messaging, many people still use email, particularly for business. It is imperative that people abide by the laws, regulations, codes, and standards that apply to email because if they don't, the communication channel may be jeopardized. Email has certain risks attached to it as well. Most nations rarely have laws that specifically address email. The Email Act, for instance, is hardly ever found. However, email is covered by a wide range of regulations. E-commerce regulations, for instance, frequently apply (like the ECT Act in South Africa).

To learn more about Email Act refer to:

https://brainly.com/question/25642105

#SPJ1

Write Java statements to declare an array that will store the total car sales values (int) for each month of the year

Answers

The Java statements to declare an array that will store the total car sales values (int) for each month of the year is given below:

The Statement

int[] months = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};

This given program gives each value for each month of the year and gives them a number from 1 to 12 which signifies the 12 months of the year:

January, February, March, April, May, June, July, August, September, August, October, November, and December.

Hence, for each sale made, it is computed and the total for each month is printed, along with each individual month and listed out as output.

Read more about java programming here:

https://brainly.com/question/18554491
#SPJ1

Problem: A company wants a program that will calculate the weekly paycheck for an employee based on how many hours they worked. For this company, an employee earns $20 an hour for the first 40 hours that they work. The employee earns overtime, $30 an hour, for each hour they work above 40 hours.

Example: If an employee works 60 hours in a week, they would earn $20/hr for the first 40 hours. Then they would earn $30/hr for the 20 hours they worked overtime. Therefore, they earned: ($20/hr * 40hrs) + ($30/hr * 20 hrs) = $800 + $600 = $1400 total.

For this assignment, you must create pseudocode and a flowchart to design a program that will calculate an employee’s weekly paycheck.

Write pseudocode to design a programming solution by outlining a series of steps and using appropriate indentation and keywords. As you write your pseudocode, be sure to consider the following:
What input does the computer need?
What steps does the program need to follow to process the input? What output should result?
When might you need to use decision branching? If you used decision branching, did you account for all possible input values?
Did you use appropriate indentation and keywords (such as IF, ELSE, CALCULATE, and so on) throughout your pseudocode?
Create a flowchart to design a programming solution by organizing a series of steps and using appropriate symbols and arrows. As you create your flowchart, be sure to use appropriate arrows and symbols for each of the following:
Start and end points
Input and output
Decision branching
Processing steps
Note: You may find the correct shapes to create your flowchart on the Insert menu in Microsoft Word. Or you may draw your flowchart by hand, take a clear picture, and insert the picture into your Word document. Use the add shapes or insert pictures tutorials to help you. You could also use a flowcharting tool that you are familiar with, such as Lucidchart, if you prefer.

Answers

Using the knowledge in computational language in pseudocode  it is possible to write a code that programming solution by outlining a series of steps and using appropriate indentation and keywords.

Writting the code:

h = int(input('Enter hours '))

rate = 20

if h <= 40:

   pay = h * rate

elif h > 40:

   pay = ((h-40) * rate * 1.5) + rate * 40

print("Your pay is %.2f" % pay)

Set hourly rate to 20

Input hours worked

If hours worked is under 40

   Compute hours worked times hourly rate equals pay

Else hours worked is over 40

   Compute ?

Endif

Print pay

See more about pseudocode at brainly.com/question/12975450

#SPJ1

For this task you have the chance to show what you’ve learned about implementing repetition in code. You are required to create a program that uses the while loop structure.

Write a program that always asks the user to enter a number. When the user enters the negative number -1, the program should stop requesting the user to enter a number. The program must then calculate the average of the numbers entered excluding the -1.

Make use of the while loop repetition structure to implement the program.

Answers

Explanation:

#include <stdio.h>

main(){

int x,c=0,sum=0;

float a;

printf("enter a number (don't enter -1)\n");

scanf("%d",&x);

while(x!=-1){

c++;

sum+=x;

printf("enter a number(enter -1 to calculate the average)\n");

scanf("%d",&x);

}

a=float(sum)/c;

printf("the average is %.2f ",a);

}

Write an SQL statement to display for every restaurant the name of the restaurant (where the name of the restaurant consists of more than 10 characters) and for every category of menu item its description (catdesc). Furthermore, display the average; cheapest or lowest; and highest or most expensive price of all menu items in that category at that restaurant. Use single row functions to format all the prices. The average price must be padded; the cheapest price must be rounded; but the highest price must not be rounded. Display only those menu items of which the average item price is more than R40. Sort your results according to the restaurant names and for every restaurant from the most expensive average menu item to the cheapest average menu item. Display your results exactly as listed below.

Answers

Using the knowledge in computational language in SQL it is possible to write the code that display for every restaurant the name of the restaurant  and for every category of menu item its description.

Writting the code:

INSERT INTO Dish Values(13, 'Spring Rolls', 'ap');

INSERT INTO Dish Values(15, 'Pad Thai', 'en');

INSERT INTO Dish Values(16, 'Pot Stickers', 'ap');    

INSERT INTO Dish Values(22, 'Masaman Curry', 'en');  

INSERT INTO Dish Values(10, 'Custard', 'ds');  

INSERT INTO Dish Values(12, 'Garlic Bread', 'ap');    

INSERT INTO Dish Values(44, 'Salad', 'ap');    

INSERT INTO Dish Values(07, 'Cheese Pizza', 'en');  

INSERT INTO Dish Values(19, 'Pepperoni Pizza', 'en');    

INSERT INTO Dish Values(77, 'Veggie Supreme Pizza', 'en');

INSERT INTO MenuItem Values(0, 0, 13, 8.00);

INSERT INTO MenuItem Values(1, 0, 16, 9.00);

INSERT INTO MenuItem Values(2, 0, 44, 10.00);

INSERT INTO MenuItem Values(3, 0, 15, 19.00);

INSERT INTO MenuItem Values(4, 0, 22, 19.00);

INSERT INTO MenuItem Values(5, 3, 44, 6.25);

INSERT INTO MenuItem Values(6, 3, 12, 5.50);

INSERT INTO MenuItem Values(7, 3, 07, 12.50);

INSERT INTO MenuItem Values(8, 3, 19, 13.50);

INSERT INTO MenuItem Values(9, 5, 13, 6.00);

INSERT INTO MenuItem Values(10, 5, 15, 15.00);

INSERT INTO MenuItem Values(11, 5, 22, 14.00);

See more about SQL atbrainly.com/question/13068613

#SPJ1

with aid of two examples, describe the use of merging of docments

Answers

Answer:

Answer down below

Explanation:

Q's Asked: With the aid of two examples, describe the use of merging of documents.

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

Explanation of "merging documents":

What is the use of merging of documents?

Well merging documents is really only used for organization or systems where documents/ data are changed by different users or systems.

Anyway The requirements for "mail merging" is :

(a) Main Document,

(b) Data Source,

(c) Merge Document.

: Meaning of A horizontal merger: A horizontal merger is when competing companies merge—companies that sell the same products or services.

: Meaning of A vertical merger: A vertical merger is a merger of companies with different products. :3

Welp anyway back to the Q's: With the aid of two examples, describe the use of merging of documents.Umm some people that use "merging of documents", are horizontal mergers which increase market share, such as Umm... T-moblie and sprit bc they are both a phone company. vertical mergers which exploit existing synergies.  So like ummm.... a sports drink company and a car company combining together. hope this helps ~~Wdfads~~~
Other Questions
Carter is hooked on a new book series, The Galaxy. Each book in the series is the samelength and chronicles a different year in the Waka Waka Galaxy. Carter has cleared off the topshelf of his bookcase to leave room for each of the books as they come out.There is a proportional relationship between the number of books on the shelf, x, and howmuch shelf space the books take up (in inches), y. if, in a heterozygous individual, only one allele is expressed in the phenotype, that allele is: group of answer choices recessive. normal. potent. haploid. dominant. brian looks down while sitting at the top of the ferris wheel. he immediately feels his heart start to pound. he is confused by this response until he remembers his last experience on a ferris wheel. during that experience, the wind started to blow, the seats began to rock, and he thought he was going to die. brian realizes his heart is pounding because he is afraid. which theory best explains this sequence of events? which of the following transactions is most likely to appear on a statement of net worth? select one. question 3 options: a. inheriting property other than cash b. employer contributions made to a retirement savings account c. appreciation in value of a primary residence d. all of the above In the fourth verse of "go down, moses," what theme is the speaker conveying with the descriptions of what the lord says? the idea that moses is bold and speaks powerful words the idea that the lord struck down all the first-born son's of egypt because pharaoh would not let the israelites go the idea that enslavement is a loathsome burden and is unjust the idea that enslavement is not just unjust, but is so offensive to the lord that he will enact judgement if the enslaver's do not release the people they enslave helen bought her granddaughter a doll for her birthday, and she bought her grandson a toy truck. helen is showing that she has gender about the typical preferences that boys and girls have for toys. question 13 options: 1) orientations 2) stereotypes 3) roles 4) identities which hypothesis or hypotheses about the relation between life satisfaction and job satisfaction has received the most empirical support? among the four giant planets, which one has the global-average density smaller than the density of liquid water and which one has the strongest magnetic field? what is the answer to this equation? 20=v+9-16 PLEASE HELP AND FAST which group in the periodic table contains elements with the valence electron configuration of ns2np1? your father's friend has promised to grant you anything you wish if you successfully complete school. write a letter telling him at least three things you want and why a police car is located 70 feet to the side of a straight road. a red car is driving along the road in the direction of the police car and is 90 feet up the road from the location of the police car. the police radar reads that the distance between the police car and the red car is decreasing at a rate of 75 feet per second. how fast is the red car actually traveling along the road? producers provide factors of production to the product market. do not participate in the factor market. purchase factors of production from the factor market. provide dollars to the product market. one reason for the distribution of tropical rainforests around the world a loan with borrow options that can be long term with periodic adjustments or short term with more frequent adjustments to the rate is a(n) mortgage. Which of the following is true of sports supplements? A.) Most athletes cannot get the nutrition they need from food alone.B.) Most athletes need at least one supplement.C.) They have been proven to increase athletic performance.D.) They can cause unpleasant negative side effects.also, the answer isnt C, i tried that already, it said it was wrong A point has the coordinates (0, k).Which reflection of the point will produce an image at the same coordinates, (0, k)? true or false: the benefits of an environmental marketing strategy extend to virtually all of a firm's stakeholders when the strategy is effectively integrated within a firm's general marketing plan. abba, inc. has developed the following standards for one of its products: direct materials - 1/2 pound at $6.00 per pound; direct labor - 1/4 hour at $20.00 per hour; variable overhead - 20% of direct labor cost. total fixed overhead is expected to be $15,000 and the company expects to produce 7,500 units. the standard cost card for this product will show a cost per unit of