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 Statementint[] 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
least privilege meaning in cybersecurity
Answer:
It is where each system is designed so that it only has the permissions necessary to operate, nothing more.
Explanation:
This is done for security concerns, which is the whole reason for cybersecurity.
Create a loop to display all even numbers from 0 to 100. Describe the three elements that must be included in order for a loop to
perform correctly. What will happen if these statements are not included? Provide examples.
The three elements that must be included in order for a loop to perform correctly. What will happen if these statements are not included? Provide examples
A loop to display all even numbers from 0 to 100:
for(i= 0;i<= 100; i++) {
if(counter%2 == 0) {
printf("%d ",i);
The loop consists of three important parts:
the initialization: the keyword that starts the loopthe condition: the condition being testedthe update: for each iteration.By missing a condition statement in a for loop, it would loop forever.
Example:
void main() {
int i = 10;
for( ; ;) {
printf("%d\n",i); }
}
As in the above code, the for loop is running for infinite times and printing the i value that is 10 infinitely.
What is a for loop used for?
A "For" Loop is used to repeat a specific block of code a known number of times.
What are the main types of loops?
There are two types of loops, “while loops” and “for loops”. While loops will repeat while a condition is true, and for loops will repeat a certain number of times.
What are the elements of a loop?
Loop statements usually have three components: initialization, condition, and update step, and it contains a loop body.
To know more about loop:
https://brainly.com/question/16922594
#SPJ1
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)
the proper use of safety equipment in your vehicle has the potential to ___.
The proper use of safety equipment in your vehicle has the potential to reduce the chances of injury.
Why safety equipment is required?Safety equipment may be defined as a type of equipment that delivers a sense of protection that is significantly used by workers in order to avoid injuries, casualties, life-threatening situations, etc.
Safety equipment may include a set of numerous objects and things like gloves, safety glasses and shoes, earplugs or muffs, hard hats, respirators, coveralls, vests, and full-body suits. All these pieces of equipment possess a common intention behind the safety of an individual.
Therefore, the proper use of safety equipment in your vehicle has the potential to reduce the chances of injury.
To learn more about Safety equipment, refer to the link:
https://brainly.com/question/28389789
#SPJ1
Find advert in magazines or websites of working desktop computer systems or laptop as well as a monitor, keyboard and software you will also need additional devices such as mouse or printer. Reports outlines and explaining the details of the advertising
Because of our independence, you have complete control over your data. Your information is your information. Independent, open platform. MRC-accredited metrics Increase the effectiveness of advertising.
How do you write outlines for reports and explain the details of advertising?Analyze market position information for the product and explain how that position is expected to change. Make a list of suggestions to improve your next advertisement.
Typically, advertising campaigns promote a product or service. A national automaker, for example, may launch a new vehicle model through print advertisements in newspapers and magazines. To reach the vehicle's target market, the company may also place graphics-rich ads on websites. This combined media blitz produces more desirable results than isolated advertisements without a central strategy.
This automobile manufacturer, or any business selling a product or service, evaluates its campaign's effectiveness based on defined criteria. A written report provides an objective campaign analysis, highlights favorable results and identifies areas in which advertising strategy adjustments are appropriate.
To learn more about details of advertising refer to:https://brainly.com/question/1658517
#SPJ1
Given an array of distinct positive integers. Which of the following can be used to find the longest consecutive sub-sequence of integers? (Note that the consecutive numbers need not be sorted.)
For example, if the given array is [1 , 7, 3, 2, 8], the longest consecutive subsequence is [1 , 3, 2] as 1 , 2,3 are consecutive integers.
A Naive approach can be used to find the longest consecutive sub-sequence of integers.
What do you mean by Integers?Integers may be defined as whole numbers that can be positive, negative, or zero. It does not include any functional number or the numbers in the form of p/q. Examples of integers may include -5, 1, 5, 8, 97, etc.
The idea for finding the longest consecutive sub-sequence of integers is to sort or filter the array and find the longest subarray with consecutive elements. After sorting the array and eliminating the multiple occurrences of elements, run a loop and keep a count and max.
Therefore, a Naive approach can be used to find the longest consecutive sub-sequence of integers.
To learn more about Integers, refer to the link:
https://brainly.com/question/929808
#SPJ1
How is the logo for a popular sportswear company protected?
A) by a copyright
B) by a patent
C) by a trademark
D) by a trade secret
Answer:
C) by a trade mark
Explanation:
By using a trademark they'll be able to tell other companies that the logo is theirs
Answer:
answer is C.
Explanation:
How does a Cell is Addressed in MS Excel ?
Cells are the boxes you see in the grid of an Excel worksheet, like this one. Each cell is identified on a worksheet by its reference, the column letter and row number that intersect at the cell's location. This cell is in column D and row 5, so it is cell D5. The column always comes first in a cell reference
What are some examples of common watermarks? Check all that apply.
save
sample
draft
do not copy
open
The common Watermarks that can be applied are
1. Sample
2. Do not copy
3. Draft
What is watermark with example?
Watermarking is the process of superimposing a logo or piece of text atop a document or image file, and it's an important process when it comes to both the copyright protection and marketing of digital works.
There are two types of digital watermarking:
Visible Digital Watermarking:
Invisible Digital Watermarking:
Hence, Sample , Do not copy and Draft can be considered as Watermark
To know more about watermark from the given link
https://brainly.com/question/19709292
#SPJ4
What is output by the following code? Select all that apply.
c = 2
while (c < 12):
print (c)
c = c + 3
When the above code is run via a compiler, the output will be 5.
What is code in programming?In computer programming, computer code is a set of instructions or a set of rules expressed in a specific programming language (i.e., the source code). It is also the name given to source code after it has been compiled and is ready to execute on a computer.
The print() method outputs the message supplied to the screen or another standard output device. The message can be a string or any other object, which will be transformed to a string before being displayed on the screen.
When the above code is correctly entered into the compiler and rightly indented, the output given is 5.
Learn more about compilers:
https://brainly.com/question/27882492
#SPJ1
which search algorithm uses three variables to mark positions within the array as it searches for the searchvalue?
A binary search algorithm that uses three variables to mark positions within the array as it searches for the searchvalue.
What is a binary search?In Computer technology, a binary search simply refers to an efficient algorithm that is designed and developed for searching an element (information) from a sorted list of data that are stored on a database, especially by using the run-time complexity of Ο(logn)
Note: n is the total number of elements in a list.
Additionally, keywords and search operators are important variables (elements) that have a significant effect on search results. Therefore, searchvalue is a binary search algorithm that is designed and developed to make use of three (3) variables to mark positions within an array as it perform a searche operation.
Read more on binary search here: https://brainly.com/question/17180912
#SPJ1
common errors in writing Python
Answer:
1.not following the rules
2.misusing expression
Write an expression using Boolean operators that prints "Special number" if special_num is -99, 0, or 44.
A sample expression that uses Boolean operators that prints "Special number" if special_num is -99, 0, or 44 is given below:
The Programimport java.util.Scanner;
import java.io.*;
public class Test
{
public static void main(String[]args) throws IOException
{
File file = new File("SNUMS.INP");
Scanner inputFile = new Scanner(file);
int order = 1;
int i = 1;
int[] special = new int[1000000+1];
// Write all 10^6 special numbers into an array named "special"
while (order <= 1000000)
{
if (specialNumber(i) == true)
{
special[order] = i;
order++;
}
i++;
}
// Write the result to file
PrintWriter outputFile = new PrintWriter("SNUMS.OUT");
outputFile.println(special[inputFile.nextInt()]);
while (inputFile.hasNext())
outputFile.println(special[inputFile.nextInt()]);
outputFile.close();
}
public static boolean specialNumber(int i)
{
// This method check whether the number is a special number
boolean specialNumber = false;
byte count=0;
long sum=0;
while (i != 0)
{
sum = sum + (i % 10);
count++;
i = i / 10;
}
if (sum % count == 0) return true;
else return false;
}
}
Read more about boolean operators here:
https://brainly.com/question/5029736
#SPJ1
on What is the output of the following code: int i = 1; while (i <= 9)
{
system. out.print(i+"");
i=i+2;
}
Answer:
13579
java
Explanation:
notice that the System.out.print call does not output a new line.
so... it is going to print 1, then what is 1 plus 2? the answer is 3.
what is 3 plus 2? the answer is 5.
what is 5 plus 2? the answer is 7.
what is 7 plus 2? the answer is 9.
now if we proceeded, i is more than 9, thus ends the while loop.
the output is 13579
because there are no newlines, the numbers are all squished together on the same line.
Tech A says that it is usually better to pull a wrench to tighten or loosen a bolt. Tech B says that
pushing a wrench will protect your knuckles if the wrench slips. Who is correct?
Tech A is correct because pulling a wrench to tighten or loosen a bolt secures it to the bolt threading, reducing the possibility of it slipping.
How to tighten nuts and bolts?
Place your socket on the wrench's head. To begin using your torque wrench, insert a socket that fits your nut or bolt into the torque wrench's head. If you have an extender or adaptor, you can insert it into the opening at the head instead.
Hand-tighten the nut or bolt until it catches the threading on the screw. Place the nut or bolt to be tightened over the threading for the screw or opening on your vehicle by hand. Turn the nut or bolt on the vehicle clockwise with your fingers until the threading on the screw catches. Turn the nut or bolt until it can no longer be turned by hand.
Place the wrench on top of the nut or bolt being tightened. Hold the torque wrench handle in your nondominant hand while the nut or bolt is set on the threading.
Tighten the nut or bolt by turning the handle clockwise. When the wrench starts clicking or stops moving, stop turning it.
To know more about wrench and bolts, kindly visit: https://brainly.com/question/15075481
#SPJ1
1. Write down a brief history about the internet.
Answer:
The Internet was developed by Bob Kahn and Vint Cerf in the 1970s. They began the design of what we today know as the 'internet. ' It was the result of another research experiment which was called ARPANET, which stands for Advanced Research Projects Agency Network.
Explanation:
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.
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
Akari is trying to use the input she receives from the user to calculate an average. But her program keeps crashing after the user types in their input.
What has she most likely forgotten to do?
A. declare a variable
B. validate the user input
C. use a loop
D. use a colon after an if statement
Since Akari is trying to use the input she receives from the user to calculate an average, she is most likely forgotten to do option C. use a loop.
Is there a average function in Python?Python mean() function: The statistics module in Python 3 includes a built-in function to determine the mean or average of a set of values. To determine the mean or average, utilize the statistics. mean() function.
Note that each element in the list will be iterated over by the for-loop, which adds and stores each number within the sum num variable. Python's built-in len() function is used to calculate the average of the list by dividing the sum num value by the count of the numbers in the list.
So, you start by making the list whose average you want to determine, and then you make a variable to hold the total of the numbers. We'll set the variable to zero. Then add to the sum variable by iterating through each item in the list. Lastly, divide the total by the length.
Learn more about loop from
https://brainly.com/question/16922594
#SPJ1
The cpu is the component responsible for commanding which other component in the system?
The CPU is the component responsible for commanding memory in the system. The correct option is 3.
What is a CPU?The CPU is instructed on what to do next and how to communicate with other components by the operating system, a sizable program.
As you are aware, there are numerous computer operating systems, including the Microsoft Windows operating system. An operating system is a substantial piece of software that controls your computer and aids the CPU in decision-making. The CPU is controlled by an operating system so that it can communicate with other system components.
Therefore, the correct option is 3. Memory.
To learn more about CPU, refer to the link:
https://brainly.com/question/14671593
#SPJ1
The question is incomplete. Your most probably complete question is given below:
1. CPU
2. bus
3. memory
4. I/O subsystem.
E-commerce Web sites can use many different hardware architectures to divide the work of serving Web pages, administering databases, and processing transactions.
Discuss in detail the TWO (2) types of web architectures generally used in ecommerce websites.
The two type of web architectures generally used in ecommerce websites are the business logic and the customer side application.
What are web architectures?Web architectures are defined as a system that controls the communication between application components. The interconnections between web applications, databases, and middleware technologies are referred to as web application architecture.
The user interface is executed on the client side, which is the first, and database data is stored on the server side, which is the second. The business logic and the customer-side application are two web applications that operate on opposite sides of the architecture.
Thus, the two type of web architectures generally used in ecommerce websites are the business logic and the customer side application.
To learn more about web architectures, refer to the link below:
https://brainly.com/question/28560751
#SPJ1
Design a flowchart or pseudocode for a program that accepts two
numbers from a user and displays one of the following messages: First
is larger, second is larger, and numbers are equal.
Using the knowledge in computational language in python it is possible to write the code that design a flowchart or pseudocode for a program that accepts two numbers from a user and displays
Writting the code:firstNum=int(input("enter the firstNum "))
secondNum=int(input("enter the secondNum "))
First="First is larger"
Second="Second is large"
Equal="Numbers are equl"
if firstNum>secondNum:
print(First)
elif(secondNum>firstNum):
print(Second)
else:
print(Equal)
See more about python at brainly.com/question/18502436
#SPJ1
What is variable view?
Answer:
Variable View contains descriptions of the attributes of each variable in the data file. In Variable View, rows are variables. Columns are variable attributes.
Explanation:
Data View is where we inspect our actual data and. Variable View is where we see additional information about our data.
Write a function so that the main() code below can be replaced by the simpler code that calls function MphAndMinutes ToMiles().
Original main):
int main()
double milesPerHour;
double minutesTraveled;
double hoursTraveled;
double milesTraveled;
cin >> milesPerHour;
cin >> minutesTraveled;
hoursTraveled minutesTraveled / 60.0;
milesTraveled - hoursTraveled * milesPerHour;
cout ‹< "Miles:
<< milesTraveled ‹‹ endl;
return 0;
#include <iostream>
double mph_and_minutes_to_miles(double mph, double min) {
return mph*double(min/60);
}
int main(int argc, char* argv[]) {
double imph, imin; std::cin>>imph>>imin;
std::cout << "Miles: " << mph_and_minutes_to_miles(imph,imin) << std::endl;
return 0;
}
Secure websites use technology that scrambles the information you send. This is known as
A. hacking.
B. encryption.
C. padlocking.
D. digital media.
Answer:
B. Encryption.
Explanation:
Encryption encrypts data so that it can not be understood if/when it is intercepted by a third party between the sender and the recipient.
For example, if you're encrypting via the keyword vanilla, and then sending an email to Bob saying "Hi Bob", it would get encrypted as something like Vjh D5xx. The recipient would then use the keyword vanilla to decrypt this message so they can read it as Hi Bob. Anyone who intercepts this wouldn't have the keyword, and would just see incoherent letters, numbers, and symbols that they couldn't make heads or tails of.
Secure websites use technology that scrambles the information you send. This is known as, Encryption. So, the correct option is B.
Given that,
Secure websites use technology that scrambles the information you send.
Since, Secure websites use encryption technology to scramble the information you send, ensuring that it remains secure and protected during transmission.
Encryption involves the use of mathematical algorithms to transform data into an unreadable format, making it extremely difficult for unauthorized parties to access or understand the information.
This is a fundamental method used to safeguard sensitive data on the internet.
So, Option B is true.
To learn more about Encryption visit:
https://brainly.com/question/30408255
#SPJ6
Carlos is studying human skin cells under a microscope during science class. He asks his teacher why cells are small. Which response does his teacher give him?
Since Carlos is studying human skin cells and he asks his teacher why cells are small. The response that his teacher give him will be: Larger cells could not efficiently transport nutrients.
Why are big cells not productive?The plasma membrane won't have enough surface area if the cell enlarges too much to support the rate of diffusion needed to accommodate the larger volume. In other words, a cell gets less effective as it develops.
Any of the four major cell types that make up the epidermis may be referred to as "skin cells." These are the Langerhans cells, Merkel cells, keratinocytes, and melanocytes.
Note that Because there is less plasma membrane and a longer distance for molecules to travel, a large cell has more volume and is less effective at moving items into, out of, and through the cell. The cell needs its supplies to be received and transferred in a timely manner for many of its organelles.
Learn more about human skin cells from
https://brainly.com/question/27132976
#SPJ1
the difference bitween hardware and software ?
Answer:
Hardware refers to the physical and visible components of the system such as a monitor, CPU, keyboard and mouse. Software, on the other hand, refers to a set of instructions which enable the hardware to perform a specific set of tasks.
Hardware is any physical part of the computer, like the monitor or keyboard. Software is the virtual part that tells the hardware what to do.
GAME DESIGN
If you are designing a video game that will primarily be played on a smartphone or tablet, what considerations about the operation or control methods should you keep in mind?
If you are designing a video game that will primarily be played on a smartphone or tablet, the considerations about the operation or control methods that you should keep in mind are:
The Orientation of the device; The processing power of the device; andThe size of the device in relation to the spacing of the controlls.What are video games?As a result, there is a growing need for mobile app development services and mobile app development companies. As a result of this demand, various smartphone app development businesses promise to provide excellent services.
Regardless of phone manufacturer improvements, there are still uses for the game design process, such as:
Feature Creep IssueNot Targeting the Correct AudienceGetting the Game NoticedManaging Security ConcernsOperating System Fragmentation.Creating the Monetization ModelUpkeep.Learn more about video games:
https://brainly.com/question/28060919
#SPJ1
Many documents use a specific format for a person's name. Write a program that reads a person's name in the following format:
firstName middleName lastName (in one line)
and outputs the person's name in the following format:
lastName, firstInitial.middleInitial.
Ex: If the input is:
Pat Silly Doe
the output is:
Doe, P.S.
If the input has the following format:
firstName lastName (in one line)
the output is:
lastName, firstInitial.
Ex: If the input is:
Julia Clark
the output is:
Clark, J.
Using the knowledge in computational language in JAVA it is possible to write the code that write a program whose input is: firstName middleName lastName, and whose output is: lastName, firstName middleInitial.
Writting the code:import java.util.Scanner;
import java.lang.*;
public class LabProgram{
public static void main(String[] args) {
String name;
String lastName="";
String firstName="";
char firstInitial=' ',middleInitial=' ';
int counter = 0;
Scanner input = new Scanner(System.in);
name = input.nextLine(); //read full name with spaces
int i;
for(i = name.length()-1;i>=0;i--){
if(name.charAt(i)==' '){
lastName = name.substring(i+1,name.length()); // find last name
break;
}
}
for(i = 0;i<name.length()-1;i++){
if(name.charAt(i)==' '){
firstName = name.substring(0, i); // find firstName
break;
}
}
for(i = 0 ;i<name.length();i++){
if(name.charAt(i)==' '){
counter++; //count entered names(first,middle,last or first last only)
}
}
if(counter == 2){
for(i = 0 ;i<name.length();i++){
if(Character.toUpperCase(name.charAt(i)) == ' '){
middleInitial = Character.toUpperCase(name.charAt(i+1));//find the middle name initial character
break;
}
}
}
firstInitial = Character.toUpperCase(name.charAt(0)); //the first name initial character
if(counter == 2){
System.out.print(lastName+", "+firstName+" "+middleInitial+".");
}else{
System.out.print(lastName+", "+firstName);
}
}
}
See more about JAVA at brainly.com/question/12975450
#SPJ1
Describe how smartphones communicate. List and describe four popular types of messages you can send with smartphones. Write one well-written paragraph and answer the above question to earn 10 points.
The way that smartphones communicate is that people connect with each other and with businesses has been changed by mobile messaging. However, users and businesses can choose from a variety of mobile messaging types.
The Kinds Of Mobile Messaging are:
SMS & MMS MessagingPush Notifications.In-App Messages.RCS.What is the messaging about?Brief Message Service (SMS): One of the most popular types of mobile communications is SMS. A basic text message sent via a cellular signal is known as an SMS, or short messaging service.
SMS is completely text-based and has a character restriction of 160. Users in the United States who don't have an unlimited messaging package pay cents per message.
Therefore, in Notifications through Push: It's possible that you mistakenly believe that the thing that's flashing on your cell phone's screen is a text message. Similar to SMS messages, push notifications are pop-up windows that appear while you're using your phone or on the lock screen rather than in your inbox with other texts.
Learn more about Mobile Messaging from
https://brainly.com/question/27534262
#SPJ1
5. Define a procedure “DistanceBetweenTwoPoints” that will take four paramaters x1, y1, x2
and y2 and will calculate the distance between these two points using the formula
√((x2 – x1)² + (y2 – y1)²). You must use the SquareRoot function you defined previously.
[10 points]
Test case:
> (DistanceBetweenTwoPoints 2 5 3 2)
3.1622776601683795
Can anyone please help me to write this procedure in Scheme Language? I am stuck! Please help!
Using the knowledge in computational language in JAVA it is possible to write the code that define a procedure “DistanceBetweenTwoPoints” that will take four paramaters x1, y1, x2 and y2.
Writting the code:package org.totalbeginner.tutorial;
public class Point {
public double x;
public double y;
Point(double xcoord, double ycoord){
this.x = xcoord;
this.y = ycoord;
}
public double getX() {
return x;
}
public double getY() {
return y;
}
}
package org.totalbeginner.tutorial;
public class Line {
double x;
double y;
Point p1 = new Point(2.0,2.0);
Point p2 = new Point(4.0,4.0);
Point mp = new Point(x,y);
public void midpoint() {
x = (p1.getX() + p2.getX()) / 2;
y = (p1.getY() + p2.getY()) / 2;
}
See more about JAVA at brainly.com/question/12975450
#SPJ1