import java.util.Scanner;
public class MyClass1 {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int smallest = 0, largest = 0, num, count = 0;
while (true){
System.out.println("Enter a number (-1 to quit): ");
num = scan.nextInt();
if (num == -1){
System.exit(0);
}
else if (num < 0){
System.out.println("Please enter a positive number!");
}
else{
if (num > largest){
largest = num;
}
if (num < smallest || count == 0){
smallest = num;
count++;
}
System.out.println("Smallest # so far: "+smallest);
System.out.println("Largest # so far: "+largest);
}
}
}
}
I hope this helps! If you have any other questions, I'll do my best to answer them.
Java exists a widely utilized object-oriented programming language and software platform. Sun Microsystems initially introduced Java, a programming language and computing platform, in 1995.
What is meant by java?Sun Microsystems initially introduced Java, a programming language and computing platform, in 1995. It has grown from its modest origins to power a significant portion of the digital world of today by offering the solid foundation upon which numerous services and applications are developed.
The object-oriented programming language and software platform known as Java are used by millions of devices, including laptops, cellphones, gaming consoles, medical equipment, and many others. The syntax and guiding ideas of Java are derived from C and C++.
The program is as follows:
import java.util.Scanner;
public class MyClass1 {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int smallest = 0, largest = 0, num, count = 0;
while (true){
System.out.println("Enter a number (-1 to quit): ");
num = scan.nextInt();
if (num == -1){
System.exit(0);
}
else if (num < 0){
System.out.println("Please enter a positive number!");
}
else{
if (num > largest){
largest = num;
}
if (num < smallest || count == 0){
smallest = num;
count++;
}
System.out.println("Smallest # so far: "+smallest);
System.out.println("Largest # so far: "+largest);
}
}
}
}
To learn more about Java refer to:
https://brainly.com/question/25458754
#SPJ2
Write a program that calculates pay for either an hourly paid worker or a salaried worker Hourly paid workers are paid their hourly pay rate times the number of hours worked. Salaried workers are paid their regular salary plus any bonus they may have earned. The program should declare two structures for the followingdata Hourly Paid Salary Bonus The program should also declare a union with two members. Each member should be a structure variable: one for the hourly paid worker and another for the salaried worker. The union should be part of another structure that also contains a flag for what portion of the union should be used. (If you have questions about this part, please email the instructor) The program should ask the user whether he or she is calculating the pay for an hourly paid worker or a salaried worker. Regardless of which the user selects, the appropriate members of the union will be used to store the data that will be used to calculate the pay Use the following flow structure and functions: Function: Main-Askes user if salaried or hourly. Calls appropriate function based on answer to gather information about the worker. Main should receive a worker pointer back. Main then calls the print function for the worker Function:getHourly-Asks the user for the hourly rate and number of hours worked, storing the answers in a new worker object, which it returns Function getSalaried-Asks the user for the salary and bonus for a worker, storing the answers in a new worker object, which it returns Function printWorker-takes a worker object, and prints out a report for the information about the worker, including the gross pay (which would be calculated) Note: Input validation not required, but would be no negative numbers, and no values greater than 80 for hours worked * Your two structures must be named "hourly" and "salaried", the union should be named Accept both capital and lowercase letters for selecting what type of worker from the user
The program that is required here is a payroll program. See the explanation below.
What is a program?A program is a series of instructions that are given to a computer in a predetermined language with precise instruction that delivers a specific output.
What is the required program?The program that calculates the pay - (Payroll program) is given as follows:
#include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
int paycode;
int WeeklySalary;
double pay;
int HourlySalary;
int TotalHours;
int GrossWeeklySales;
int pieces;
int PieceWage;
cout << "Enter paycode (-1 to end): ";
cin >> paycode;
while (1); {
switch (paycode) {
case '1':
cout << "Manager selected." << endl;
cout << "Enter weekly salary: ";
cin >> WeeklySalary;
cout << endl;
pay = WeeklySalary;
cout << "The manager's pay is $ " << pay;
cout << endl;
break;
case '2':
cout << "Hourly worker selected." << endl;
cout << "Enter the hourly salary: ";
cin >> HourlySalary;
cout << endl;
cout << "Enter the total hours worked: " << endl;
cin >> TotalHours;
if ( TotalHours <= 40)
pay = HourlySalary * TotalHours;
else
pay = (40.0 * HourlySalary) + (TotalHours - 40) * (HourlySalary * 1.5);
cout << endl;
cout << "Worker's pay is $ " << pay;
cout << endl;
break;
case '3':
cout << "Commission worker selected." << endl;
cout << "Enter gross weekly sales: ";
cin >> GrossWeeklySales;
cout << endl;
pay = (GrossWeeklySales *.57) + 250;
cout << " Commission worker's pay is $ " << pay;
break;
case '4':
cout << "Pieceworker selected." << endl;
cout << "Enter number of pieces: ";
cin >> pieces;
cout << "Enter wage per piece: ";
cin >> PieceWage;
pay = pieces * PieceWage;
cout << "Pieceworker's pay is $ " << pay;
break;
}
}
system ("pause");
return 0;
}
Learn more about programs at;
https://brainly.com/question/1538272
#SPJ1
Why do the USB 3.0 ports need a power cable? O USB 3.0 needs power to encrypt data as it travels across the cable.O USB 3.0 transfers increased levels of power. O USB 3.0 is more power efficient than earlier USB versions. O USB 3.0 requires more power to transfer data more quickly than earlier USB versions.
As a result of USB 3.0's enhanced power transfer rates, the ports require a power cable.
Which name is given to a power cable?Using a wall outlet or extension cord, a power cord, line cord, or mains cable temporarily connects a device to the mains energy supply.
Do you mean power cable or power cord?The main cable that supplies power to the computer, printer, monitor, and other components within a computer is referred to variously as a power cord, mains cable, or flex. The power cord seen in the image is an illustration of one that is frequently used with peripherals including printers, monitors, computers, and monitor stands.
To know more about Power cable visit:
https://brainly.com/question/11023419
#SPJ4
Which is true regarding pseudocode?
O It uses simple words and symbols to communicate the design of a program.
O It compiles and executes code.
O It expresses only complex processes.
O It gives a graphical representation of a set of instructions to solve a problem.
Answer:
The answer is A it uses simple words and symbols to communicate the design of a program.
Explanation:
Science Stuff
The true regarding pseudocode is it uses simple words and symbols to communicate the design of a program. The correct option is a.
What is pseudocode?Pseudocode is a simple language description of an algorithm or other system's processes used in computer science. Although pseudocode frequently employs standard programming language structure rules, it is written for humans rather than automated comprehension.
In the field of computer science, a pseudocode is a linguistic description of an algorithm's steps. They consist of text-based components and are simple. Informally expressing concepts and techniques during the development process is known as pseudocoding.
Therefore, the correct option is a, It uses simple words and symbols to communicate the design of a program.
To learn more about pseudocode, refer to the link:
https://brainly.com/question/17442954
#SPJ6
Which phrase refers to the collection of geospatial data through the use of satellite images/pictures?
Answer:
The appropriate answer will be "Using remote sensing".
Explanation:
Such basic applications of Earth's remote sensing images usually involve:
Heavily forested fires could be viewed out of space, enabling the wanderers to have a much wider area than those of the field. Trying to track particles to accurately forecast the weather either watch volcanic eruptions, including helping out for outbreaks of dust.So that the above is the correct solution.
Hey can y’all help me with this thanks
Answer:The answer is 144
Explanation:First you subtract the two numbers which would be 8-2=6
Then you multiply the 6 by how many numbers there are: 6x2=12
then you multiply 12 by itself: 12x12=144
both character literals and string literals can be assigned to a char variable. group of answer choices true false
This statement is true. Both character literals and string literals can be assigned to a char variable.
In programming languages that support both character and string data types, it is possible to assign both character literals and string literals to a char variable. This flexibility allows for various use cases and simplifies handling different types of data
A character literal represents a single character enclosed in single quotes, such as 'A' or '7'. It is a primitive data type used to represent individual characters. On the other hand, a string literal represents a sequence of characters enclosed in double quotes, such as "Hello" or "123". It is a composite data type used to represent a collection of characters.
When assigning a character literal to a char variable, the value of the character literal is directly stored in the variable. For example, if we have a char variable named 'myChar', we can assign a character literal like 'A' or '7' to it.
Similarly, when assigning a string literal to a char variable, the first character of the string literal is extracted and stored in the variable. For example, if we have a char variable named 'myChar', we can assign a string literal like "Hello" or "123" to it, and only the first character ('H' or '1') will be stored in the variable.
Therefore, both character literals and string literals can be assigned to a char variable, allowing for versatility in handling different types of data.
Learn more about character literals here:
https://brainly.com/question/28302970
#SPJ11
The Publication Manual of the American Psychological Association, Seventh Edition is the official source for APA Style. With millions of copies sold worldwide in multiple languages, it is the style manual of choice for writers, researchers, editors, students, and educators in the social and behavioral sciences, natural sciences, nursing, communications, education, business, engineering, and other fields.
a. true
b. false
The statement about The Publication Manual of the American Psychological Association, Seventh Edition is true. This statement is aligned from the APA public statement about the The Publication Manual of the American Psychological Association, Seventh Edition.
What is APA?APA stand for American Psychology Association. APA is standard format or a guide for documentation in academic documents like scholarly journal articles and books. The guidelines in APA were developed to help reader to read comprehension in the documentation , for clarity of communication, and for "selected word which best reduces bias in language". The latest version of APA is the seventh edition.
Learn more about APA here
https://brainly.com/question/25874812
#SPJ4
A technician just installed windows 7 on his computer. which two steps should the technician take next for computer security? (choose two.)
The two steps that should the technician take next for computer security are:
Ensure that the Windows Firewall is enabledInstall and update anti-virus and antispyware programWhat is Windows 7?Windows 7 is a program of the Windows operating system, and it is a programming system of the computer that has many new advancements to run the computer.
The technician is installing Windows 7 to a system. He should take care of that Windows Firewall and antivirus to save the system from viruses.
Thus, the correct options are:
c. Ensure that the Windows Firewall is enabled
d. Install and update antivirus and antispyware program
To learn more about Windows 7, refer to the link:
https://brainly.com/question/971394
#SPJ1
The question is incomplete. Your most probably complete question is given below:
a. The workstation is a victim of a denial of service attack.
b. The username is not authenticating on the network.
c. Ensure that the Windows Firewall is enabled
d. Install and update anti-virus and antispyware program
Consider the following code segment. int x = 0; x ; x = 1; x = x 1; x -= -1; system.out.println(x); what is printed when the code segment has been executed?
The output that is printed when the code segment has been executed is 4.
What is a code segment?A code segment also referred to as a text segment or just text in computing, is a section of an object file or the equivalent piece of the program's virtual address space that holds executable instructions.
How does a code segment work?When a program is saved in an object file, the code section is included.
When the loader loads a program into memory for execution, multiple memory regions (specifically, pages) are allocated, matching to both segments in the object files and segments only needed at run time.
Learn more about Code Segment:
https://brainly.com/question/25781514
#SPJ1
Full Question:
Consider the following code segment.
int x = 0;x++;x += 1;x = x + 1;x -= -1;
System.out.
println(x);
What is printed when the code segment has been executed?
Write a statement to print the data members of InventoryTag. End with newline. Ex: if itemID is 314 and quantityRemaining is 500, print: Inventory ID: 314, Qty: 500
#include
typedef struct InventoryTag_struct {
int itemID;
int quantityRemaining;
} InventoryTag;
int main(void) {
InventoryTag redSweater;
redSweater.itemID = 314;
redSweater.quantityRemaining = 500;
/* Your solution goes here */
return 0;
}
A statement to print the data members of InventoryTag is given below.
What is data members?
The term "data members" refers to both members and other types, such as pointer, reference, array types, bit fields, and user-defined types, that are declared with any of the fundamental types.
The same rules apply to declaring a data member as a variable, with the exception that explicit initializers are not permitted inside the class definition. A const static data member of an enumeration or integral type, however, may have an explicit initializer.
The dimensions of an array must be specified if it is declared as a nonstatic class member.
Executable C Code:
#include <stdio.h>
typedef struct InventoryTag_struct {
int itemID;
int quantityRemaining;
} InventoryTag;
int main(void) {
InventoryTag redSweater;
redSweater.itemID = 314;
redSweater.quantityRemaining = 500;
/* Your solution goes here */
printf("Inventory ID: %d, Qty: %d\n",redSweater.itemID,redSweater.quantityRemaining);
getchar();
return 0;
}
Learn more about data members
https://brainly.com/question/25555303
#SPJ4
Uploading Your Work
Assignment Upload: Using PowerPoint
Active
Instructions
Click the links to open the resources below. These resources will help you complete the assignment. Once you have created your
file(s) and are ready to upload your assignment, click the Add Files button below and select each file from your desktop or network
folder. Upload each file separately.
Your work will not be submitted to your teacher until you click Submit.
Documents
Uploading Your Work Directions
Clip Art and Media Clips Student Guide
Animations and Photo Albums Student Guide
Customizing SmartArt Graphics and Tables Student Guide
Don’t know how to do this and could really use some help please!!!!!!!
Answer:
Easy all you have to do is upload one assignment at a time and follow all the other directions!
Explanation:
_Hope_this_helps! >O<
The cost of repairing a new desk's leg--broken accidentally by an employee moving the desk into place--is expensed immediately.
The cost of repairing a new desk's broken leg, caused by an employee moving the desk into place, is expensed immediately. This ensures that expenses are matched with the period in which they occur, following the accounting principle of matching.
The cost of repairing a new desk's leg, which was broken accidentally by an employee while moving the desk into place, is expensed immediately. This means that the cost of the repair will be recognized as an expense on the company's financial statements in the period in which it occurred.
Expensing the repair immediately is in line with the matching principle in accounting, which states that expenses should be recognized in the same period as the related revenues. Since the broken leg was a result of moving the desk into place, it can be considered a cost directly related to the acquisition of the desk and therefore should be expensed immediately.
To provide a clearer explanation, let's consider an example: Suppose a company purchased a new desk for $1,000. While an employee was moving the desk, one of its legs broke. The cost of repairing the leg is $200. In this case, the company would recognize a $200 expense in the period the leg broke, reducing the overall value of the desk to $800.
To know more about expenses visit:
brainly.com/question/29850561
#SPJ11
Write a program to calculate the farthest in each direction that Gracie was located throughout her travels. Add four print statements to the lines of code above that output the following, where the number signs are replaced with the correct values from the correct list:
Answer:
If you're given a set of coordinates that Gracie has travelled to, you can find the farthest in each direction with something like this (I'll use pseudocode in lieu of a specified language):
left = right = top = bottom = null
for each location traveled{
if left == null or location.x < left {
left = location.x
}
if right == null or location.x > right {
right = location.x
}
// note that I'm assuming that the vertical position increases going downward
if top == null or location.y < top {
top = location.y
}
if bottom == null or location.y > bottom {
bottom = location.y
}
}
As for the four print statements and other information, insufficient information is provided to complete that.
can someone help me, please
Answer:
eeeee
Explanation: flamingo youtooz
At the end of a presentation it is important to:
Answer: We just no man, Don't ask us, just watch and learn.
Explanation: These are just facts, and you know it.
when considering the agile project management process, at the end of each iteration
When considering the agile project management process, at the end of each iteration "stakeholders and customers review progress and reevaluate priorities" (option D)
Who are the stakeholders in an agile project management process?Agile management is the application of Agile software development and Lean management ideas to different management activities, most notably product development.
Agile methodologies began to extend into other areas of activity with the publication of the Manifesto for Agile Software Development in 2001.
The project team, product owner, scrum master, and key organizational representatives are common stakeholders in an agile project management approach.
Learn more about agile project management at:
https://brainly.com/question/14318704
#SPJ1
Full Question:
When considering the agile project management process, at the end of each iteration
team members are released to work on other projects
product owner determines whether or not the project is complete
the Scrum master can terminate the project
stakeholders and customers review progress and reevaluate priorities
the Scrum master assigns daily tasks to team members
Discuss the evolution of file system data processing and how it is helpful to understanding of the data access limitations that databases attempt to over come
Answer:
in times before the use of computers, technologist invented computers to function on disk operating systems, each computer was built to run a single, proprietary application, which had complete and exclusive control of the entire machine. the introduction and use of computer systems that can simply run more than one application required a mechanism to ensure that applications did not write over each other's data. developers of Application addressed this problem by adopting a single standard for distinguishing disk sectors in use from those that were free by marking them accordingly.With the introduction of a file system, applications do not have any business with the physical storage medium
The evolution of the file system gave a single level of indirection between applications and the disk the file systems originated out of the need for multiple applications to share the same storage medium. the evolution has lead to the ckean removal of data redundancy, Ease of maintenance of database,Reduced storage costs,increase in Data integrity and privacy.
Explanation:
computer processing cycle is related to how we learn computer processing cycle
Answer:
For just a computer to execute productive work, the web browser has to obtain data and instructions from the outside world.
Explanation:
Information or guidelines are provided to the computer on the Input side of the understanding-acquisition process. Documentation is stored in the database during the access step of a pattern recognition cycle.
The sequence of events in data processing, including:-
input. processing. storage and output.Such systems interact and replicate over and over again. Input — enter data into your machine.
A(n) ________ CPU has two processing paths, allowing it to process more than one instruction at a time. Group of answer choices dual-core bimodal all-in-one dual-mode Flag question: Question 79 Question 791 pts ________ is concerned with the design and arrangement of machines and furniture to avoid uncomfortable or unsafe experiences. Group of answer choices Repetitive strain prevention Ergonomics Positioning Occupational safety
Answer:
A dual CPU has two processing paths, allowing it to process more than one instruction at a time.
Ergonomics is concerned with the design and arrangement of machines and furniture to avoid uncomfortable or unsafe experiences.
Which field can be used to track the progress on tasks that a user has created? A. A. Subject
B. Start Date
C. Due Date
D. % Complete
are the following statements h0 : = 7 and h1 : ≠ 7 valid null and alternative hypotheses? group of answer choices no, there are no parameters contained in these statements.
The statements h0: = 7 and h1: ≠ 7 are not valid null and alternative hypotheses since they do not contain any parameters to test. A valid hypothesis should have parameters that can be tested statistically.
No, the statements h0: = 7 and h1: ≠ 7 are not valid null and alternative hypotheses. This is because they do not contain any parameters to test.A hypothesis is a statement made to assume a particular event or relationship among different events. A null hypothesis is a hypothesis that is assumed to be true until proven otherwise by statistical analysis.
An alternative hypothesis is the hypothesis that is assumed to be true if the null hypothesis is rejected or proved to be incorrect.In statistics, the null hypothesis is denoted by h0 while the alternative hypothesis is denoted by h1. Both h0 and h1 should contain parameters that can be tested statistically. In this case, h0: = 7 and h1: ≠ 7 do not contain any parameters to test. Therefore, they are not valid null and alternative hypotheses.
A null hypothesis is a statement that assumes that there is no relationship between variables. It is used to test the statistical significance of the relationship between variables. An alternative hypothesis, on the other hand, assumes that there is a relationship between variables.The statements h0: = 7 and h1: ≠ 7 do not contain any parameters to test. Therefore, they are not valid null and alternative hypotheses. They cannot be used to test the relationship between variables. A valid hypothesis should have a parameter that can be tested statistically.
To know more about hypotheses visit:
brainly.com/question/33444525
#SPJ11
having a legitimate reason for approaching someone to ask for sensitive information is called what?
Which activity might be a job or task of an IT worker who manages work
Answer: Sets up a LAN for the office
Explanation:
The activity that might be a job or task of an IT worker who manages work is the setting up of a local area network for the office.
Through the setting up of the local area network, the computers in the company can be interconnected together within the organization.
Compare two processors currently being produced for personal computers. Use standard industry benchmarks for your comparison and briefly list the advantages and disadvantages of each. You can compare different processors from the same manufacturer (such as two Intel processors) or different processors from different manufacturers (such as Intel and AMD).
Answer:
The intel core i7 and core i9
advantages;
- The core i7 and core i9 have maximum memory spaces of 64GB and 128GB respectively.
- They both support hyper-threading.
- core i7 has 4 cores and 8 threads while the i9 has 8 cores and 16 threads.
- The maximum number of memory channels for i7 and i9 are 3 and 4 respectively.
- The Base frequencies of core i7 and i9 are 1.10GHz and 3.00GHz respectively.
demerits;
- High power consumption and requires a high-performance motherboard.
- Costly compared to earlier Intel processors
- They do not support error correction code memory, ECC
Explanation:
The intel core i7 and i9 processors are high-performance processors used in computing high-resolution graphics jobs and in processes where speed is required. This feature makes these processors flexible, to be used in most job types.
Note that computers with these processors are costly, must have and be upgraded with a DDR3 RAM chip, and consumes a lot of power to generate high-performance.
Ballet was originally created for the wedding celebration of Louis XVI and Marie Antoinette. (True or False)
Answer:
true
Explanation:
what 1950s technology was crucial to the rapid and broad success of rock and roll
The technology that was crucial to the rapid and broad success of rock and roll in the 1950s was the invention and mass production of the Electric Guitar.
The electric guitar allowed musicians to produce a louder, distorted sound, which became a defining characteristic of the rock and roll genre.Know more about Electric Guitar here,
https://brainly.com/question/30741599
#SPJ11
What is bug in computer?
Answer:
A bug in a computer is refered to as a "computer virus" its where certain things on the computer or apps on it aren't working like they were designed to.Explanation:
Hope this helps:)!How do I delete the Chrome apps folder, because I tried to remove from chrome but it won't let me
Answer:
Explanation:
1. Open your Start menu by selecting the Windows logo in the taskbar and then click the “Settings” cog icon.
2. From the pop-up menu, click “Apps.”
3.Scroll down the “Apps & Features” list to find g00gle chrome
4. Click “G00gle Chrome” and then select the “Uninstall” button.
Hope this help!
Helped by none other than the #Queen herself
what pillar allows you to build a specialized version of a general class, but violates encapsulation principles
The pillar which allows you to build a specialized version of a general class but violates encapsulation principle is inheritance. In inheritance pillar you can create a general class or specifically a parent class and acquire another object method and properties.
Inheritance in Object Oriented Programming (OOP)Four pillars of Object Oriented Programming are abstraction, encapsulation, inheritance, and polymorphism. In inheritance an object can acquire another general object characteristics. It's like a child who inherited the parent's characteristics. What's the benefit of this pillar? Of course, reusability of the object, so you don't have to repeat a block code over and over again. This makes the code clean, simple and effective.
Learn more about programming language https://brainly.com/question/16397886#SPJ4
How is your approach to solving how to order your coins different from how a computer might have to approach it?
Answer: Computer solves the order of coins the way its programmed to while you solve the order of coins the way you want.