Answer:
Here is the Array class named Number:
#include <iostream>
#include <iomanip>
using namespace std;
class Number {
private:
int size;
float *ptr;
float num;
public:
Number(){
cout<<"Enter size of array: ";
cin>>size;
ptr = new float[size];
cout<<"Enter elements"<<endl;
for(int i=0;i<size;i++) {
cin>>ptr[i]; } }
void getNumbers(){
cout << "{ ";
for (int i = 0; i < size; i++) {
cout <<ptr[i] <<setprecision(2)<< " "; }
cout << "}"; }
Number(int s){
ptr = new float[s];
size = s;
for (int i = 0; i < size; i++) {
cout << "Enter elements : ";
cin >> num;
ptr[i] = num; } }
~Number(){
delete [] ptr; }
void storeNumber(int input, float num){
while (input < 0 || input > size-1) {
cout << "array size exceeded! Enter an element again " << endl;
cin >> input;
if (input >= 0 && input < size) {
ptr[input] = num;
break; } }
if (input >= 0 && input < size) {
ptr[input] = num; } }
void retrieveNumber(int position){
while (position < 0 || position > size-1) {
cout << "array size exceeded! Enter an element again " << endl;
cin >> position;
if (position >= 0 && position < size) {
cout << "The number at "<<position<<"is: " << ptr[position];
break; } }
if (position >= 0 && position < size) {
cout << "The number at "<<position<<" is: " << ptr[position]; } }
float HighestNumber(){
float highest = ptr[0];
for (int i = 1; i < size; i++) {
if (ptr[i] > highest) {
highest = ptr[i]; } }
return highest; }
float LowestNumber(){
float lowest = ptr[0];
for (int i = 1; i < size; i++) {
if (ptr[i] < lowest) {
lowest = ptr[i]; } }
return lowest; }
float AverageNumber(){
float avg = 0.0;
for (int i = 0; i < size; i++) {
avg += ptr[i]; }
return avg/size; }
};
int main() {
Number array;
array.getNumbers();
cout << endl;
int pos;
float no;
cout << "Choose an element to replace: ";
cin >> pos;
cout << "What number do you want to replace element with?" << endl;
cin >> no;
array.storeNumber(pos, no);
array.getNumbers();
cout << endl;
int pos1;
cout << "Enter an element to retrieve the number: ";
cin >> pos1;
cout << endl;
array.retrieveNumber(pos1);
cout << endl;
cout << endl;
cout << "The highest number is: " << array.HighestNumber() << endl;
cout << "The lowest number is : " << array.LowestNumber() << endl;
cout << "Average of all numbers is : " << array.AverageNumber() << endl;
cout << endl;
return 0; }
Explanation:
The program is well explained in the comments mentioned with each line of code in the attached document.
The screenshot of the program along with its output is attached.
Theatre seat booking - Java program
Part A
A new theatre company called ‘New Theatre’ has asked you to design and implement a new Java program to manage and control the seats that have been sold and the seats that are still available for one of their theatre sessions. They have provided you with their floorplan in which we can see that the theatre is composed of 3 rows, each with a different number of seats: 12, 16 and 20 retrospectively.
Task 1) Create a new project named Theatre with a class (file) called Theatre (Theatre.java) with a main method that displays the following message ‘Welcome to the New Theatre’ at the start of the program. Add 3 arrays (one for each row) in your program to keep record of the seats that have been sold and the seats that are still free. Row 1 has 12 seats, row 2 has 16 seats and row 3 has 20 seats. 0 indicates a free seat, 1 indicates an occupied (sold) seat. At the start of the program all seats should be 0 (free). This main method will be the method called when the program starts (entry point) for all Tasks described in this work.
Task 2) Add a menu in your main method. The menu should print the following 8 options: 1)Buy a ticket, 2) Print seating area, 3) Cancel ticket, 4) List available seats, 5) Save to file, 6) Load from file, 7) Print ticket information and total price, 8) Sort tickets by price, 0) Quit. Then, ask the user to select one of the options. Option ‘0’ should terminate the program without crashing or giving an error. The rest of the options will be implemented in the next tasks. Example:
-------------------------------------------------
Please select an option:
1) Buy a ticket
2) Print seating area
3) Cancel ticket
4) List available seats
5) Save to file
6) Load from file
7) Print ticket information and total price
8) Sort tickets by price
0) Quit
------------------------------------------------
Enter option:
Tip: Think carefully which control structure you will use to decide what to do after the user selects an option (Lecture Variables and Control Structures).
Task 3) Create a method called buy_ticket that asks the user to input a row number and a seat number. Check that the row and seat are correct and that the seat is available. Record the seat as occupied (as described in Task 1). Call this method when the user selects ‘1’ in the main menu.
Task 4)
A) Create a method called print_seating_area that shows the seats that have been sold, and the seats that are still available. Display available seats with the character ‘O’ and the sold seats with ‘X’. Call this method when the user selects ‘2’ in the main menu.
The output should show the following when no tickets have been bought:
OOOOOOOOOOOO
OOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOO
After purchasing a ticket for row 1, seat 6, and a ticket for row 3, seat 10, using option ‘1’ in the menu, the program should display the following:
OOOOOXOOOOOO
OOOOOOOOOOOOOOOO
OOOOOOOOOXOOOOOOOOOO
B) Update your code to align the display such that shows the seats in the correct location, and the stage, as shown below:
***********
* STAGE *
***********
OOOOOX OOOOOO
OOXXXXXX OOOOOXXX
XXOOOOXXXO XXXOOOXXXX
Task 5) Create a method called cancel_ticket that makes a seat available again. It should ask the user to input a row number and a seat number. Check that the row and seat are correct, and that the seat is not available. Record the seat as occupied (as described in
Task 1). Call this method when the user selects ‘3’ in the main menu.
Task 6) Create a method called show_available that for each of the 3 rows displays the seats that are still available. Call this method when the user selects ‘4’ in the main menu.
Example at the start of the program:
Enter option: 4
Seats available in row 1: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12.
Seats available in row 2: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16.
Seats available in row 3: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20.
Task 7) Create a method called save that saves the 3 arrays with the row’s information in a file. Call this method when the user selects ‘5’ in the main menu.
Task 8) Create a method called load that loads the file saved in Task 7 and restores the 3 arrays with the row’s information. Call this method when the user selects ‘6’ in the main menu.
Here's the Java program to implement the tasks described:
import java.io.*;
import java.util.*;
public class Theatre {
private static final int ROWS = 3;
private static final int[] SEATS_PER_ROW = {12, 16, 20};
private static final int TOTAL_SEATS = SEATS_PER_ROW[0] + SEATS_PER_ROW[1] + SEATS_PER_ROW[2];
private static final int[][] seats = new int[ROWS][];
private static final Scanner scanner = new Scanner(System.in);
private static boolean isModified = false;
public static void main(String[] args) {
// initialize seats to be all free
for (int i = 0; i < ROWS; i++) {
seats[i] = new int[SEATS_PER_ROW[i]];
}
// display welcome message
System.out.println("Welcome to the New Theatre");
int option;
do {
// print menu
System.out.println("Please select an option:");
System.out.println("1) Buy a ticket");
System.out.println("2) Print seating area");
System.out.println("3) Cancel ticket");
System.out.println("4) List available seats");
System.out.println("5) Save to file");
System.out.println("6) Load from file");
System.out.println("7) Print ticket information and total price");
System.out.println("8) Sort tickets by price");
System.out.println("0) Quit");
System.out.print("Enter option: ");
option = scanner.nextInt();
scanner.nextLine(); // consume the newline character
switch (option) {
case 1:
buyTicket();
break;
case 2:
printSeatingArea();
break;
case 3:
cancelTicket();
break;
case 4:
showAvailable();
break;
case 5:
save();
break;
case 6:
load();
break;
case 7:
printTicketInfoAndTotalPrice();
break;
case 8:
sortTicketsByPrice();
break;
case 0:
System.out.println("Thank you for using our system. Goodbye!");
break;
default:
System.out.println("Invalid option. Please try again.");
}
} while (option != 0);
}
private static void buyTicket() {
System.out.print("Enter row number (1-" + ROWS + "): ");
int row = scanner.nextInt() - 1; // convert to 0-based index
if (row < 0 || row >= ROWS) {
System.out.println("Invalid row number. Please try again.");
return;
}
System.out.print("Enter seat number (1-" + SEATS_PER_ROW[row] + "): ");
int seat = scanner.nextInt() - 1; // convert to 0-based index
if (seat < 0 || seat >= SEATS_PER_ROW[row]) {
System.out.println("Invalid seat number. Please try again.");
return;
}
if (seats[row][seat] == 1) {
System.out.println("Seat already taken. Please choose another seat.");
return;
}
seats[row][seat] = 1;
isModified = true;
System.out.println("Ticket purchased successfully.");
}
private static void printSeatingArea() {
System.out.println("***********");
System.out.println("* STAGE *");
System.out.println("***********");
for (int i = 0; i < ROWS; i++) {
What is the explanation of the above code?
The program manages and controls the seats sold and available for a theatre session.
It starts by displaying a welcome message and a menu with several options, including buying a ticket, printing the seating area, canceling a ticket, listing available seats, saving and loading from a file, and sorting tickets by price.
Each option is implemented as a separate method. The program keeps track of the seats that have been sold and the seats that are still available using three arrays, one for each row. It displays the seating area using 'X' for sold seats and 'O' for available seats, and includes the stage.
The program allows users to buy and cancel tickets, list available seats, and save/load data to/from a file.
Learn more about Java Codes;
https://brainly.com/question/30479363
#SPJ1
what is computer hardware
Computer hardware refers to the physical components of a computer system that can be seen and touched. It encompasses all the tangible parts that make up a computer, enabling it to function and perform various tasks. Hardware includes devices such as the central processing unit (CPU), memory (RAM), storage devices (hard drives, solid-state drives), input devices (keyboard, mouse), output devices (monitor, printer), and other peripheral devices (speakers, scanners, etc.).
These hardware components work together to execute and manage data and instructions within a computer system. The CPU acts as the brain of the computer, performing calculations and executing instructions. Memory provides temporary storage for data and instructions that the CPU can quickly access. Storage devices store data in a more permanent manner, allowing it to be retained even when the computer is turned off.
Input devices enable users to input data and commands into the computer, while output devices display or present processed information to the user. Peripheral devices expand the capabilities of the computer system, providing additional functionalities and connectivity options.
Computer hardware is essential for the functioning of a computer and determines its processing power, storage capacity, and overall performance. It is complemented by software, which provides the instructions and programs necessary to utilize the hardware effectively. Together, hardware and software form the foundation of modern computer systems.
For more such questions on components, click on:
https://brainly.com/question/28351472
#SPJ11
1.Siguraduhing _______ang mga datos o impormasyong
2.Isaalang- alang ang partikular na _______ o lokasyon ng pinagmulan ng impormasyon
3.Upang matiyak na hindi ______ang mga impormasyon, maaaring magsaliksik at kilalaning mabuti ang awtor at ang kanyang mga artikulo
Answer:
1.maayos
2. Lugar
3. mali
Explanation:
im correct if I'm rwong :-)
(d, Dash Style 2, The Tools on drawing Toolbar are classified into how many groups a, 4 b, 5 c, 6 d, 3
The tools on the toolbar are classified Into 2 parts
What are the 2 sections on tool bar ?
First section:
Select: Objects are chosen. Click on the top-leftmost object to start the selection process, then drag the mouse to the bottom-right object while holding down the mouse button. The chosen region is indicated by a rectangle with marching ants. By simultaneously choosing multiple objects and hitting the Control button, you can choose multiple objects at once.
a straight line is drawn.
A straight line that ends in an arrowhead is called an arrow. When you let go of the mouse button, the arrowhead will be positioned there.
Rectangle: a rectangle is drawn. To draw a square, click the Shift button.
Draw an ellipse using this command. To make a circle, use the Shift button.
Text
vertical text
Connectors, basic shape
Second part:
1 Edit Points | 4 From File | 7 Alignment | 10 Interaction
2 Glue Points | 5 Gallery | 8 Arrange | 11 Visible Buttons
3 Font work | 6 Rotate | 9 Extrusion ON/Off
Hence to conclude there are 2 sections on toolbar
To know more on toolbars follow this link
https://brainly.com/question/13523749
#SPJ9
Select all the correct answers.
Which two features do integrated development environments (IDES) and website builders both provide?
A. offer pre-defined themes for layout
B. offer a file manager to store all programming and multimedia resources
C. make use of WYSIWYG editors
D. help highlight errors in source code
E. help ensure the website will perform on all platforms
The two features that integrated development environments (IDES) and website builders both provide are offer pre-defined themes for layout.
What are the features of integrated development environment?The known features of integrated development environments is that it is one that is made up of a code editor, a compiler or interpreter, and a kind of a single graphical user interface (GUI).
Note that An IDE is one that consists of at a source code editor, create automation tools.
Hence, The two features that integrated development environments (IDES) and website builders both provide are offer pre-defined themes for layout.
Learn more about IDES from
https://brainly.com/question/13190885
#SPJ1
What are the three major languages used in web development
Answer:
• HTML (Hyper Text Markup Language) < />
• CSS (Cascade Style Sheets) { /}
• JS (Java Script) {#}
Explanation:
\({}\)
Answer:
HTML5
Cuss
Js+ and C++
Java script tags
describe at least five ways in which information technology can help studying subjects other than computing
Answer:
I'd that IT can help in a great many different fields like
Mathematics, in a manner of solving complex math equations
Statistics, in a manner of creating complex graphs with millions of points
Modeling, in a manner of creating models from scratch, either for cars, personal projects or characters for video games and entertainment
Advertising, in a manner of using IT to create not only the advertisements themselves but also, spreading that advertisement to millions in a single click
Music/Audio, in a manner of creating new sounds and music that wouldn't be able to work in any practical manner
Explanation:
Assume a large shared LLC that is tiled and distributed on the chip. Assume that the OS page size is 16KB. The entire LLC has a size of 32 MB, uses 64-byte blocks, and is 32-way set-associative. What is the maximum number of tiles such that the OS has full flexibility in placing a page in a tile of its choosing?
Answer:
19 - 22 bits ( maximum number of tiles )
Explanation:
from the given data :
There is 60 k sets ( 6 blocks offset bits , 16 index bits and 18 tag bits )Address has 13-bit page offset and 27 page number bits14-22 bits are used for page number and index bitstherefore any tour of these bits can be used to designate/assign tile number
so the maximum number of tiles such that the OS has full flexibility in placing a page in a tile of its choosing can be between 19 -22 bits
Which feature should a system administrator use to meet this requirement?
Sales management at universal Containers needs to display the information listed below on each account record- Amount of all closed won opportunities- Amount of all open opportunities.
A. Roll-up summary fields
B. Calculated columns in the related list
C. Workflow rules with fields updates
D. Cross-object formula fields
Answer:
The correct answer is option (A) Roll-up summary fields
Explanation:
Solution
The feature the administrator needs to use to meet this requirement is by applying Roll-up summary fields.
A roll-up summary field :A roll-up summary field computes or determine values from associated records, for example those in a linked list. one can develop a roll-up summary field to d a value in a master record by building the values of fields in a detail record.
simple machines reduce the amount of work necessary to perform a task.
true or false?
True.
Simple machines are devices that are used to make work easier. They can reduce the amount of force, or effort, required to perform a task by increasing the distance over which the force is applied, or by changing the direction of the force. Examples of simple machines include levers, pulleys, wheels and axles, inclined planes, wedges, and screws. By using simple machines, the amount of work required to perform a task can be reduced.
Help me please!!!. And if you gonna copy from the internet make the sentence sound different so the teach doesn’t know I’m copying ty!
Answer:
10. Letter 'm'
11. It's about baseball. The catcher and the umpire
12. An anchor
Example of mediated communication and social media
Answer: mediated communication: instant messages
social media: social platforms
Explanation:
Tunes up and maintains your PC, with anti-spyware, privacy protection, and system cleaning functions. A _ _ _ n _ _ _ S _ _ _e _ C _ _ _
Tunes up and maintains your PC, with anti-spyware, privacy protection, and system cleaning functions is all-in-one PC optimizer"
How do one maintains their PC?An all-in-one PC optimizer improves computer performance and security by optimizing settings and configuration. Tasks like defragmenting hard drive, optimizing startup, managing resources efficiently can be done.
Anti-spyware has tools to detect and remove malicious software. Protect your computer and privacy with this feature. System cleaning involves removing browser history, temporary files, cookies, and shredding sensitive data.
Learn more about privacy protection from
https://brainly.com/question/31211416
#SPJ1
in windows explorer,a computers drives are listed in the what
Answer:
"This PC"
Explanation:
Disk drives (both fixed as well as removable drives) appear under the “This PC” category in File Explorer navigation pane. In addition, each removable drive will be pinned as a separate category, appearing after “This PC” and “Libraries” section — that is, the drives appear twice in the navigation pane.
Hi!
i want to ask how to create this matrix A=[-4 2 1;2 -4 1;1 2 -4] using only eye ones and zeros .Thanks in advance!!
The matrix A=[-4 2 1;2 -4 1;1 2 -4] can be created by using the following code in Matlab/Octave:
A = -4*eye(3) + 2*(eye(3,3) - eye(3)) + (eye(3,3) - 2*eye(3))
Here, eye(3) creates an identity matrix of size 3x3 with ones on the diagonal and zeros elsewhere.
eye(3,3) - eye(3) creates a matrix of size 3x3 with ones on the off-diagonal and zeros on the diagonal.
eye(3,3) - 2*eye(3) creates a matrix of size 3x3 with -1 on the off-diagonal and zeros on the diagonal.
The code above uses the properties of the identity matrix and the properties of matrix addition and scalar multiplication to create the desired matrix A.
You can also create the matrix A by using following code:
A = [-4 2 1; 2 -4 1; 1 2 -4]
It is not necessary to create the matrix A using only ones and zeroes but this is one of the way to create this matrix.
Cmu cs academy unit 4 flying fish
Does someone have the answers for 4.3.3 flying fish in cmu cs academy explore programming (cs0)? I'm stuck on it
The code you provided tells that the fish should be hooked when the mouse is close enough to the fish and below the water, with the following condition:
python
elif (mouseY > 300):
However, this condition alone may not be enough to properly hook the fish. You may need to adjust the condition or add additional conditions to ensure that the fish is being hooked correctly.
What is the Python code about?Based on the code you provided, it seems like you have implemented some restrictions for moving the fishing line and hooking the fish. If the fish is too far from the boat, you only move the fishing line. If the mouse is too far from the fish, you only move the line. If the mouse is close enough to the fish and below the water, the line should hook the fish.
However, it's hard to tell what specific issue you are facing without more context or a more detailed description of the problem. One thing to check is the values you are using to determine if the fish is close enough to be hooked. You mentioned that the horizontal distance between the mouse and the fish should be no more than 80, but your code checks if the mouse is less than 260. If this value is incorrect, it could be preventing the fish from being hooked.
Therefore, Another thing to check is the order in which you are updating the position of the fish and the fishing line
Read more about Python coding here:
https://brainly.com/question/26497128
#SPJ1
See full text below
cs cmu academy unit 4.4 fishing need help on homework
[Python]
app.background = gradient('lightSkyBlue', 'orange', start='top')
# sun and lake
Circle(250, 335, 50, fill='gold')
Rect(0, 300, 400, 100, fill='dodgerBlue')
# boat and fishing rod
Polygon(0, 270, 0, 350, 50, 350, 85, 315, 100, 270, fill='sienna')
Line(0, 240, 140, 160)
# fishing line, fish body, and fish tail
fishingLine = Line(140, 160, 140, 340, lineWidth=1)
fishBody = Oval(340, 340, 50, 30, fill='salmon')
fishTail = Polygon(350, 340, 380, 350, 380, 330, fill='salmon')
def pullUpFish():
fishingLine.x2 = 140
fishingLine.y2 = 225
fishBody.rotateAngle = 90
fishBody.centerX = 140
fishBody.centerY = 250
fishTail.rotateAngle = 90
fishTail.centerX = 140
fishTail.top = 255
def onKeyPress(key):
# Release the fish if the correct key is pressed.
### Place Your Code Here ###
if (key == 'r'):
fishBody.centerX = 340
fishBody.rotateAngle = 0
fishBody.centerY = 340
fishTail.rotateAngle = 0
fishTail.centerX = 365
fishTail.top = 330
pass
def onMouseDrag(mouseX, mouseY):
# If fish is very close to boat, pull it up.
### (HINT: Use a helper function.)
### Place Your Code Here ###
if (fishBody.left < 140):
pullUpFish()
# If the mouse is behind the fish, only move the line.
### Place Your Code Here ###
elif (mouseX > 340):
fishingLine.x2 = mouseX
fishingLine.y2 = mouseY
# If the mouse is too far from the fish, only move the line.
### (HINT: They are too far when horizontal distance between them is more
# than 80.)
### Place Your Code Here ###
elif (mouseX < 260):
fishingLine.x2 = mouseX
fishingLine.y2 = mouseY
# If the mouse is close enough to the fish and below the water, the line
# should hook the fish.
### (HINT: If the line 'hooks' the fish, both the line and the fish
# should move.)
### Place Your Code Here ###
elif (mouseY > 300):
fishingLine.x2 = mouseX
fishingLine.y2 = mouseY
fishBody.centerX = mouseX+ 25
fishTail.centerX = mouseX+ 50
fishBody.centerY = mouseY
fishTail.centerY = mouseY
this is what I've got so far,
https://academy.cs.cmu.edu/sharing/chartreuseBee9760
I cant seem to get the fish past where I put the restrictions any fixes?
BitTorrent, a P2P protocol for file distribution, depends on a centralized resource allocation mechanism through which peers are able to maximize their download rates.
True or False?
Answer:
yes. it is true. mark as brainlest
Attempting to write a pseudocode and flowchart for a program that displays 1) Distance from sun. 2) Mass., and surface temp. of Mercury, Venus, Earth and Mars, depending on user selection.
Below is a possible pseudocode and flowchart for the program you described:
What is the pseudocode about?Pseudocode:
Display a menu of options for the user to choose from: Distance, Mass, or Surface Temperature.Prompt the user to select an option.If the user selects "Distance":a. Display the distance from the sun for Mercury, Venus, Earth, and Mars.If the user selects "Mass":a. Display the mass for Mercury, Venus, Earth, and Mars.If the user selects "Surface Temperature":a. Display the surface temperature for Mercury, Venus, Earth, and Mars.End the program.Therefore, the Flowchart:
[start] --> [Display menu of options] --> [Prompt user to select an option]
--> {If "Distance" is selected} --> [Display distance from sun for Mercury, Venus, Earth, and Mars]
--> {If "Mass" is selected} --> [Display mass for Mercury, Venus, Earth, and Mars]
--> {If "Surface Temperature" is selected} --> [Display surface temperature for Mercury, Venus, Earth, and Mars]
--> [End program] --> [stop]
Read more about pseudocode here:
https://brainly.com/question/24953880
#SPJ1
Write VHDL code for the circuit corresponding to an 8-bit Carry Lookahead Adder (CLA) using structural VHDL (port maps). (To be completed before your lab session.)
Answer:
perdo si la pusiera es español te ayudo pero no esta en español
ng questions two features of computer .
Explanation:
accuracy, diligence, versatility
In Java only please:
4.15 LAB: Mad Lib - loops
Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (and hopefully funny) ways.
Write a program that takes a string and an integer as input, and outputs a sentence using the input values as shown in the example below. The program repeats until the input string is quit and disregards the integer input that follows.
Ex: If the input is:
apples 5
shoes 2
quit 0
the output is:
Eating 5 apples a day keeps you happy and healthy.
Eating 2 shoes a day keeps you happy and healthy
Answer:
Explanation:
import java.util.Scanner;
public class MadLibs {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
String word;
int number;
do {
System.out.print("Enter a word: ");
word = input.next();
if (word.equals("quit")) {
break;
}
System.out.print("Enter a number: ");
number = input.nextInt();
System.out.println("Eating " + number + " " + word + " a day keeps you happy and healthy.");
} while (true);
System.out.println("Goodbye!");
}
}
In this program, we use a do-while loop to repeatedly ask the user for a word and a number. The loop continues until the user enters the word "quit". Inside the loop, we read the input values using Scanner and then output the sentence using the input values.
Make sure to save the program with the filename "MadLibs.java" and compile and run it using a Java compiler or IDE.
Need help with Python coding...
2.14 LAB: Using math functions
Given three floating-point numbers x, y, and z, output the square root of x, the absolute value of (y minus z) , and the factorial of (the ceiling of z).
Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
print('%0.2f %0.2f %0.2f' % (your_value1, your_value2, your_value3))
Ex: If the input is:
5.0
6.5
3.2
Then the output is:
2.24 3.30 24.00
Answer:
6.5
24.00
it think it's my answer
1. What is virtual memory?
The use of non-volatile storage, such as disk to store processes or data from physical memory
A part of physical memory that's used for virtualisation
Some part of physical memory that a process though it had been allocated in the past
O Future physical memory that a process could be allocated
Answer:
The use of non-volatile storage, such as disk to store processes or data from physical memory.
Explanation:
Virtual memory is used by operating systems in order to allow the execution of processes that are larger than the available physical memory by using disk space as an extension of the physical memory. Note that virtual memory is far slower than physical memory.
Which of these ports listed is the fastest? IEEE 1394 USB2.0 FIREWIRE ESATA
The port which is the fastest is ESATA.
What is ESATA?eSATA can be described as the SATA connector which can be access from outside the computer and it help to give the necessary signal connection that is needed for external storage devices.
The eSATA serves as a version of the eSATA port which is been regarded as the External SATA port, therefore, The port which is the fastest is ESATA.
Read more on the port here:
https://brainly.com/question/16397886
#SPJ1
There are 12 inches in a foot and 3 feet in a yard. Create a class named InchConversion. Its main() method accepts a value in inches from a user at the keyboard, and in turn passes the entered value to two methods. One converts the value from inches to feet, and the other converts the same value from inches to yards. Each method displays the results with appropriate explanation.
Answer:
import java.util.Scanner;
public class InchConversion
{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter inches: ");
double inches = input.nextDouble();
inchesToFeet(inches);
inchesToYards(inches);
}
public static void inchesToFeet(double inches){
double feet = inches / 12;
System.out.println(inches + " inches = " + feet + " feet");
}
public static void inchesToYards(double inches){
double yards = inches / 36;
System.out.println(inches + " inches = " + yards + " yards");
}
}
Explanation:
In the inchesToFeet() method that takes one parameter, inches:
Convert the inches to feet using the conversion rate, divide inches by 12
Print the feet
In the inchesToYards() method that takes one parameter, inches:
Convert the inches to yards using the conversion rate, divide inches by 36
Print the yards
In the main:
Ask the user to enter the inches
Call the inchesToFeet() and inchesToYards() methods passing the inches as parameter for each method
Which of the following statements are true about how technology has changed work? Select 3 options. Responses Businesses can be more profitable by using communication technology to reduce the costs of travel. Businesses can be more profitable by using communication technology to reduce the costs of travel. With the spread of technology and the Internet, smaller businesses are not able to compete as effectively as before. With the spread of technology and the Internet, smaller businesses are not able to compete as effectively as before. In a gig economy, workers are only hired when they are needed for as long as they are needed. In a gig economy, workers are only hired when they are needed for as long as they are needed. Through the use of the Internet and collaboration tools more workers are able to perform their jobs remotely. Through the use of the Internet and collaboration tools more workers are able to perform their jobs remotely. Technology has not really changed how businesses operate in the last fifty years. Technology has not really changed how businesses operate in the last fifty years.
The three genuine statements almost how technology has changed work are:
Businesses can be more productive by utilizing communication technology to decrease the costs of travel. This can be genuine since advances like video conferencing and virtual gatherings permit businesses to conduct gatherings, transactions, and collaborations remotely, lessening the require for costly travel courses of action.With the spread of technology and the Web, littler businesses are not able to compete as successfully as some time recently. This explanation is genuine since innovation has empowered bigger companies to use their assets and reach a worldwide advertise more effortlessly, making it challenging for littler businesses to compete on the same scale.Through the utilize of the Web and collaboration devices, more laborers are able to perform their occupations remotely. This explanation is genuine as innovation has encouraged farther work courses of action, allowing employees to work from anyplace with an online association. Collaboration instruments like extend administration computer program and communication stages have made inaccessible work more doable and effective.Technology explained.
Technology alludes to the application of logical information, aptitudes, and devices to form innovations, fathom issues, and move forward proficiency in different spaces of human movement. It includes the improvement, usage, and utilize of gadgets, frameworks, and processes that are outlined to achieve particular assignments or fulfill specific needs.
Technology can be broadly categorized into distinctive sorts, such as data technology, communication technology, therapeutic innovation, mechanical technology, and transportation technology, among others. These categories include different areas, counting computer science, hardware, broadcast communications, building, and biotechnology.
Learn more about technology below.
https://brainly.com/question/13044551
#SPJ1
Explain 5 different types of HTML tags and give examples.
Answer:
Tag Description
<header> It defines a header for a section.
<main> It defines the main content of a document.
<mark> It specifies the marked or highlighted content.
<menuitem> It defines a command that the user can invoke from a popup menu
various types of mouse pointer
Answer:
Text Pointer
Busy Pointer
Link Pointer
Precision Pointer
Standard Pointer
Help Pointer
Background Busy Pointer
What are 3 of the most important things about internet safety that you would recommend and why
Answer:
1. Protect Your Personal Information With Strong Passwords
2. Pay Attention to Software Updates
3. Make Sure Your Devices Are Secure
Explanation:
Protect Your Personal Information With Strong Passwords because you don't want anyone getting a hold of your personal information.
Pay Attention to Software Updates because you want to make sure that they aren't fake and what is being updated. So that you don't get a virus and your information is stolen.
Make Sure Your Devices Are Secure because you don't want anyone tricking you into getting your information.
II. MULTIPLE CHOICE (five points each)
6. Units on the mechanical scale are marked off in:
a. Fractions and millimeters
b. Feet and inches
c. Inches and fractions
7. Units on the architectural scale are marked off in:
a. Fractions and feet
b. Scales and measuring devises
c. Feet and inches
8. Units on the civil scales are marked off in:
a. Whole numbers and feet
b. Whole numbers and fractions
c. Decimals with no fractions
9. The number zero is:
a. The end of the metric scale
b. The middle of the scale
c. The beginning of all scale
10. The metric scale is marked off in:
a. Both inches and fractions
b. Architectural units and metric
c. Meters