Answer:
True
Explanation:
This is a Java programWrite a method with the following header to format the integer with the specified width. public String format(int number, int width) The method returns a string for the number with one or more prefix 0s. The size of the string is the width within the range 1 to 10000inclusive. For example, format(34, 4) returns 0034 and format(34,5) returns 00034. If the number is longer than the width, the method returns the string representation for the number. For example, format(34, 1) returns 34. Assume that, the size of the string is the width within the range 1 to 10000 inclusive and the number is an integer -2147483648 to 2147483648 inclusive.Input 34 4Output 0034You must use this particular Driver classclass DriverMain{public static void main(String args[]){Scanner input = new Scanner(System.in);int num = Integer.parseInt(input.nextLine().trim());int width = Integer.parseInt(input.nextLine().trim());GW6_P5 gw6P5 = new GW6_P5();System.out.print(gw6P5.format(num,width));}
Answer:
Following are the code to this question:
import java.util.*;//import package
public class DriverMain//defining a class DriverMain
{
public static void main(String args[])//main method
{
int num,width;
Scanner input = new Scanner(System.in);//creating Scanner class fore user input
num = Integer.parseInt(input.nextLine().trim());//input value
width = Integer.parseInt(input.nextLine().trim());//input value
GW6_P5 gw6P5 = new GW6_P5();//creating base class object
System.out.print(gw6P5.format(num,width));//print method that calls base class format method
}
}
class GW6_P5 //defining base class GW6_P5
{
String format(int number, int width)//defining method format that takes two integer variable in its parameter
{
String s = ""+number;//defining s String variable that holdes integer value
int digitCount = 0;//defining integer variable
while(number!=0) //defining while loop to check value is not equal to 0
{
digitCount++;//incrementing the integer variable value
number/=10;//holding quotient value
}
if(width>digitCount)//defining if block that checks width value greather then digitCount value
{
for(int i=0;i<width-digitCount;i++)//defining for loop to add 0 in String variable
{
s = "0"+s;//add value
}
}
return s;//return String value
}
}
Output:
34
5
00034
Explanation:
In the given code, a class "DriverMain" is defined, and inside the class main method is defined that defines two integer variable "num and width", that uses the scanner class to input the value, and in the next step the "GW6_P5" class object is created that calls the format method and print its values.
In the class "GW6_P5", the format method is defined, that declared the string and integer variables, in the while loop it checks number value not equal to 0, and increments the number values, and in the for loop it adds the 0 in string value and return its value.
Write a piece of codes that asks the user to enter a month (an integer), a day (another integer), and a two-digit year. The program should then determine whether the month times the day is equal to the year. If so, it should display a message saying the date is magic. Otherwise, it should display a message saying the date is not magic.
#include
using namespace std;
int main()
{
int day;
int month;
int year;
cout<<"enter year"<
cin>>year;
cout<<"enter day"<
cin>>day;
cout<<"enter month"<
cin>>month;
//programology..
if(month*day==year)
{
cout<<"its magic programology year"<
}
else
{
cout<<"its not magic year"<
}
}
Answer:
Follows are the code to this question:
#include <iostream>//header file
using namespace std;
int main()//main method
{
int day,month,year;//defining integer variable
cout<<"please enter last two digit of the year: "; //print message
cin>>year;//input year value
cout<<"enter day: "; //print message
cin>>day;//input day value
cout<<"enter month: ";//print message
cin>>month;//print month message
if(month*day==year)//check magic date condition
{
cout<<"its magic programology year";//print message
}
else
{
cout<<"its not magic year";//print message
}
return 0;
}
Output:
please enter last two digit of the year: 98
enter day: 14
enter month: 7
its magic programology year
Explanation:
In the given code, three integer variable "day, month, and year" is declared, that uses the input method "cin" to input the value from the user-end.
In the next step, an if block statement is used that check month and day value multiple is equal to year value, if the condition is true it will print "magic programology year" otherwise it will print "not the magic year".
Write a C# program named ProjectedRaises that includes a named constant representing next year’s anticipated 4 percent raise for each employee in a company. Also declare variables to represent the current salaries for three employees. Assign values to the variables, and display, with explanatory text, next year’s salary for each employee. Note: For final submission assign the following current salaries for the employees: 25000 for employee 1, 38000 for employee 2, 51000 for employee 3. Then next year's salary for employee 1 would be displayed as: Next year's salary for the first employee will be $26,000.00
Answer:
using System;
class ProjectedRaises {
static void Main() {
const float raise = 0.04f;
double salary1 = 0.0f,salary2 = 0.0f,salary3 = 0.0f;
Console.WriteLine("Current salary for each employee: ");
salary1 = Single.Parse(Console.ReadLine());
salary2 = Single.Parse(Console.ReadLine());
salary3 = Single.Parse(Console.ReadLine());
salary1 = salary1 + raise * salary1;
salary2 = salary2 + raise * salary2;
salary3 = salary3 + raise * salary3;
Console.WriteLine("Next year salary for the employees are: ");
Console.WriteLine(Math.Round(salary1));
Console.WriteLine(Math.Round(salary2));
Console.WriteLine(Math.Round(salary3));
}
}
Explanation:
This declares and initializes variable raise as a float constant
const float raise = 0.04f;
This declares the salary of each employee as double
double salary1 = 0.0f,salary2 = 0.0f,salary3 = 0.0f;
This prompts the user for the salaries of the employee
Console.WriteLine("Current salary for each employee: ");
The next three lines get the salary of the employees
salary1 = Single.Parse(Console.ReadLine());
salary2 = Single.Parse(Console.ReadLine());
salary3 = Single.Parse(Console.ReadLine());
The next three lines calculate the new salaries of the employees
salary1 = salary1 + raise * salary1;
salary2 = salary2 + raise * salary2;
salary3 = salary3 + raise * salary3;
This prints the header
Console.WriteLine("Next year salary for the employees are: ");
The next three lines print the new salaries of the employees
Console.WriteLine(Math.Round(salary1));
Console.WriteLine(Math.Round(salary2));
Console.WriteLine(Math.Round(salary3));
Four reasons why computers are powerful
Answer:
Computers are powerful tools because they can process information with incredible speed, accuracy and dependability. They can efficiently perform input, process, output and storage operations, and they can store massive amounts of data. ... Midrange servers are bigger and more powerful than workstation computers.
Pls awnser if awnser is wrong I will unmark brainliest
Answer: i think 1, 3, and 4
Explanation:
Is this right ? Please helppppp 0111111110101011010111000010101011101010110010110101010110101110
How many nibbles are in the bit string? 5 nibbles
I
How many Bytes are in the bit string? 10 bytes
What is the bit size name for this bit string? 15/
Answer: 4054
Explanation:
i LEARND IT
Answer:
0111111110101011010111000010101011101010110010110101010110101110
How many nibbles are in the bit string? 16 nibbles
How many Bytes are in the bit string? 8 bytes
What is the bit size name for this bit string? 64
Malcolm Movers charges a base rate of $200 per move plus $150 per hour and $2 per mile. Write a program named MoveEstimator that prompts a user for and accepts estimates for the number of hours for a job and the number of miles involved in the move and displays the total moving fee. For example, if 25 hours and 55 miles are input the output would be displayed as: For a move taking 25 hours and going 55 miles the estimate is $4,060.00
Answer:
import java.util.Scanner;
public class MoveEstimator
{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
final int BASE_RATE = 200, RATE_PER_HOUR = 150, RATE_PER_MILE = 2;
int hours, miles;
double totalFee = 0.0;
System.out.print("Enter the number of hours for a job: ");
hours = input.nextInt();
System.out.print("Enter the number of miles: ");
miles = input.nextInt();
totalFee = BASE_RATE + (hours * RATE_PER_HOUR) + (miles * RATE_PER_MILE);
System.out.printf("For a move taking %d hours and going %d miles the estimate is $%.2f", hours, miles, totalFee);
}
}
Explanation:
*The code is in Java.
Create the Scanner object to be able to get input
Initialize the constant values using final keyword, BASE_RATE, RATE_PER_HOUR, RATE_PER_MILE
Declare the variables, hours, miles, totalFee
Ask the user to enter the hours and miles
Calculate the totalFee, add BASE_RATE, multiplication of hours and RATE_PER_HOUR, multiplication of miles and RATE_PER_MILE
Print the output as in required format
The program named MoveEstimator that prompts a user for and accepts estimates for the number of hours for a job and the number of miles involved in the move and displays the total moving fee is as follows:
x = int(input("number of hours for the job "))
y = int(input("number of miles involved "))
def MoveEstimator(x, y):
return 200 + 150*x + 2*y
print(MoveEstimator(x, y))
Code explanation:The first line of code used the variable, x to store the input of the hours for the jobThe second line of code is used to store the input of the number of miles travelled. Then, we define a function that accept the users inputs(argument) as variable x and y. Then return the mathematical operation to find the total moving fee.Finally, we call the function with a print statement.learn more on python code here: https://brainly.com/question/22841107
Irene wants to connect your smart phone wirelessly to her laptop in order to transfer images. which two images could she reasonably employee to connect these devices
Answer:
Your Phone: Enable Photo Sharing
Explanation:
On your Windows 10 PC, return to the Your Phone app. Click the Settings icon at the bottom of the window and turn on the switch under "Allow this app to show photos from my phone" if it’s not already enabled.
What is an embedded computer? explanation
Answer: embedded computer
Explanation: An embedded computer is a microprocessor-based system, specially designed to perform a specific function and belong to a larger system. It comes with a combination of hardware and software to achieve a unique task and withstand different conditions.
Answer:
An embedded computer is a computer that has been built to solve only a very few specific questions and is not easily changed.it has a processor, software, input and output.examples are: calculator, digital camera, elevator, copiers, printers.Pls awnser right awnsers only
Answer:
2, 4, and 5
Explanation:
Select all the correct answers. Which two statements are true about an OS? translates the user's instructions into binary to get the desired output needs to be compulsorily installed manually after purchasing the hardware is responsible for memory and device management delegates the booting process to other devices is responsible for system security Reset Next
Answer:
C. is responsible for memory and device management.
E. is responsible for system security.
Explanation:
An operating system platform is a system software pre-installed on a computing device to manage or control software application, computer hardware and user processes.
This ultimately implies that, an operating system (OS) is essentially an interface between the computer’s hardware and all the software applications (programs) running on it.
Some examples of an operating system are QNX, Linux, OpenVMS, MacOS, Microsoft windows, IBM, Solaris, VM, Ubuntu, etc.
The two statements which are true about an operating system (OS) are;
I. It's responsible for memory and device management. The operating system (OS) ensures proper allocation of memory to processes and manages all the input/output devices that are connected to the computer.
II. It's responsible for system security. The operating system (OS) makes sure the data integrity of a computer system isn't compromised i.e determining whether or not a request is to be processed through an authentication process.
The third assignment involves writing a Python program to compute the cost of carpeting a room. Your program should prompt the user for the width and length in feet of the room and the quality of carpet to be used. A choice between three grades of carpeting should be given. You should decide on the price per square foot of the three grades on carpet. Your program must include a function that accepts the length, width, and carpet quality as parameters and returns the cost of carpeting that room. After calling that function, your program should then output the carpeting cost.
Your program should include the pseudocode used for your design in the comments. Document the values you chose for the prices per square foot of the three grades of carpet in your comments as well.
You are to submit your Python program as a text file (.txt) file. In addition, you are also to submit a test plan in a Word document or a .pdf file. 15% of your grade will be based on whether the comments in your program include the pseudocode and define the values of your constants, 70% on whether your program executes correctly on all test cases and 15% on the completeness of your test report.
Answer:
# price of the carpet per square foot for each quality.
carpet_prices=[1,2,4]
def cal_cost(width,height,choice):
return width*height*carpet_prices[choice-1]
width=int(input("Enter Width : "))
height=int(input("Enter Height : "))
print("---Select Carpet Quality---")
print("1. Standard Quality")
print("2. Primium Quality")
print("3. Premium Plus Quality")
choice=int(input("Enter your choice : "))
print(f"Carpeting cost = {cal_cost(width,height,choice)}")
Explanation:
The cal_cost function is used to return the cost of carpeting. The function accepts three arguments, width, height, and the choice of carpet quality.
The program gets the values of the width, height and choice, calls the cal_cost function, and prints out the string format of the total carpeting cost.
True or False
3.The title tag defines a title for the page on the browser's Title bar.
Answer:
it would be false because of the word tag you can title a browser bar tag
Explanation:
cause it would be improper
RAM memory is intended?
Answer:
RAM is a short abbreviation for Random Access Memory. It is the physical working memory used by your PC to temporarily store computer data. Your PC stores all open applications, files, and any other data into RAM for quick access. The more RAM you have installed, the more programs you can run at the same time.
list four devices associated with video conferencing
Answer:
Video camera
2) Microphone
3) Speakers on the device being used.
4) Internet connection
Explanation:
pls mark brainliest
5. Select the correct answer.
Henry uploaded the photos of his birthday to a cloud storage system. He feels that it’s a safe option for data storage. His friend suggested that there may be a disadvantage to cloud storage. Which disadvantage is Henry’s friend referring to?
A.
The owner may not be able to delete the data after the upload.
B.
The file format of the images may be corrupted.
C.
The service can sell the data without notifying the owner.
D.
People can alter the data without notifying the owner.
E.
The data is not under the owner’s direct control.
Answer: E. The data is not under the owner’s direct control.
Explanation:
A massive disadvantage to cloud storage is that the data stored is ot under the direct control of the person uploading. They first have to access the service and that service is owned by the company offering the cloud storage.
If for any reason the company decides not to give access (depending on local laws), or if the company suffers a problem that affects its ability to offer the service, the person who uploaded could lose access to their data.
a customer calls complaining their laptop wont start what should I say
Answer:
tell them to bring there laptop to you so you can explain how to get them out of situations like those. Or maybe do a video call so the person can show you whats going on and you can take it on from there guiding her on how to fix it...
Explanation:
Write a method named countInRange that accepts three parameters: an ArrayList of integers, a minimum and maximum integer, and returns the number of elements in the list within that range inclusive. For example, if the list v contains {28, 1, 17, 4, 41, 9, 59, 8, 31, 30, 25}, the call of countInRange(v, 10, 30) should return 4. If the list is empty, return 0. Do not modify the list that is passed in.
Answer:
In Java:
The method is as follows:
public static int countInRange (ArrayList<Integer> MyList, int min, int max) {
int count = 0;
for (int i = 0; i < MyList.size(); i++) {
if(MyList.get(i)>=min && MyList.get(i)<=max){
count++;
}
}
return count;
}
Explanation:
This defines the method
public static int countInRange (ArrayList<Integer> MyList, int min, int max) {
This declares and initializes count to 0
int count = 0;
This iterates through the ArrayList
for (int i = 0; i < MyList.size(); i++) {
This checks if current ArrayList element is between min and max (inclusive)
if(MyList.get(i)>=min && MyList.get(i)<=max){
If yes, increase count by 1
count++;
}
}
This returns count
return count;
}
To call the method from main, use:
countInRange(v,m,n)
Where v is the name of the ArrayList, m and n are the min and max respectively.
Which methods will remove filters? Check all that apply.
A. In the navigation icons area, click Remove Filter.
B. In the Home Tab, in the Sort & Filter group, click Cancel.
C. On the File tab, click Save Object As, and save the table.
D. On the Home tab, in the Sort & Filter group, click Remove Filter.
E. Click the drop-down menu in the filtered column, then click Clear Filter.
F. In the Record Navigation bar, click the Filter warning, and unclick Filter.
Answer:
The last three options are the correct ones
Explanation:
Answer:
Not sure, but maybe DEF
Explanation:
16. Select the correct answer.
Which printer translates commands from a computer to draw lines on paper using several automated pens?
A.
dye-sublimation printer
B.
plotter
C.
laser printer
D.
inkjet printer
E.
photo printe
Answer: Plotter-- B
Explanation:
A Plotter is sophisticated printer that get commands from a computer and interprets them to draw high quality lines or vector graphics on paper rather than dots using one or several automated pens. This makes them useful in the area of CAD , architecture drawings and engineering designs. The types of plotters we have include Drum Plotters, Flat Bed Plotters and Ink Jet Plotters.
The correct option is B. Plotter.
The following information should be considered:
A Plotter is sophisticated printer that received commands from a computer and interprets them to draw high quality lines or vector graphics on paper instead than dots using one or several automated pens. This makes them useful in the area of CAD , architecture drawings and engineering designs. The types of plotters include Drum Plotters, Flat Bed Plotters and Ink Jet Plotters.Learn more: brainly.com/question/17429689
20 pts The Domain Name System translates the URL into
A. client
B. an IP address
C. a website
D. a web browser
Answer:
adress
Explanation:
What are some options available in the Write & Insert Fields group? Check all that apply.
O Start Mail Merge
O Highlight Merge Fields
O Edit Recipient List
O Address Block
O Greeting Line
O Rules
Answer:
Highlight Merge Fields
Address Block
Greeting Line
Rules
Explanation:
Microsoft Word refers to a word processing software application or program developed by Microsoft Inc. to enable its users type, format and save text-based documents.
A Mail Merge is a Microsoft Word feature that avails end users the ability to import data from other Microsoft applications such as Microsoft Access and Excel. Thus, an end user can use Mail Merge to create multiple documents (personalized letters and e-mails) at once and send to all individuals in a database query or table.
Hence, Mail Merge is a Microsoft Word feature that avails users the ability to insert fields from a Microsoft Access database into multiple copies of a Word document.
Some of the options available in the Write & Insert Fields group of Mail Merge are;
I. Highlight Merge Fields.
II. Address Block.
III. Greeting Line.
IV. Rules.
Leslie works in an SDLC team. When Leslie edits a file, it gets saved as an altered version. Later all the altered versions are combined to form the
final file. Which type of version control process does Leslie's company use?
OA.
file merging
ОВ.
file locking
Ос.
file subversion
OD.
file conversion
O E.
file diversion
Answer:
file subversion
Explanation:
File subversion is compliant with the copy-modify-and merge model. Here, users make personal working copies which they can adjust concurrently. After the adjustments, the files are merged into a final copy by the version control system or someone.
This is similar to the version control process of Leslie's company. The team members all save their altered versions of the files which are then finally merged into one final file.
17. Select the correct answer.
Which printing technique involves working on precise codes that are encoded and stored in a storage medium?
A.
computer numerical control
B.
electrostatic printing
C.
emboss printing
D.
offset printing
E.
gravure printing
Answer:
The right choice is option A (Computer numerical control).
Explanation:
A way to consolidate machine equipment monitoring by using programming implemented throughout the personal computer systems intimately familiar with that technology would be readily accessible. This would be widely utilized in the manufacture of thermoplastic design as well as manufacturing components.Any other solutions just shouldn't apply to the above case. So the above is the appropriate solution.
(Python)
Summary: Given integer values for red, green, and blue, subtract the gray from each value.
Computers represent color by combining the sub-colors red, green, and blue (rgb). Each sub-color's value can range from 0 to 255. Thus (255, 0, 0) is bright red, (130, 0, 130) is a medium purple, (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (In other words, equal amounts of red, green, blue yield gray).
Given values for red, green, and blue, remove the gray part.
Ex: If the input is:
130
50
130
the output is:
80 0 80
Find the smallest value, and then subtract it from all three values, thus removing the gray.
r=int(input("Enter the red value: "))
g=int(input("Enter the green value: "))
b=int(input("Enter the blue value: "))
m=min([r,g,b])
print(str(r-m)+" "+str(g-m)+" "+str(b-m))
I wrote my code in python 3.8. I hope this helps
Complete the sentence.
If you wanted the best performance for a game that requires a powerful graphics processor and lots of memory, you
would run it on a
tablet
desktop
smartphone
Suppose the following sequence of bits arrives over a link:
11010111110101001111111011001111110
Show the resulting frame after any stuffed bits have been removed. Indicate any errors that might have been introduced into the frame.
Answer:
ok
Explanation:
What category of software makes it possible to run other programs on the computer?
Select one:
a. The Controller
b. The Applications
c. System Software
d. Programming Tools
Answer:
C
Explanation:
(True/False). Will this SQL statement create a table called vehicletype? CREATE TABLE vehicletype (carid PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT);
Answer:
True
Explanation:
This SQL statement that is used to create a table called vehicletype "CREATE TABLE vehicletype (carid PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT) is a true statement.
What is the SQL statement?An SQL is a term that connote for Structured Query Language. SQL is known to be a type of statement that is often used to query and alter the relational databases such as SQL Server.
Conclusively, This SQL statement that is used to create a table called vehicletype "CREATE TABLE vehicletype (carid PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT) is a true statement becaue it is the right step to take when creating it.
Learn more about SQL statement from
https://brainly.com/question/27089762
An analogue sensor has a bandwidth which extends from very low frequencies up to a maximum of 14.5 kHz. Using the Sampling Theorem, what is the minimum sampling rate (number of samples per second) required to convert the sensor signal into a digital representation?
If each sample is now quantised into 2048 levels, what will be the resulting transmitted bitrate in kbps?
Give your answer in scientific notation to 1 decimal place.
Hint: you firstly need to determine the number of bits per sample that produces 2048 quantisation levels
Answer:
3.2*10^5
Explanation:
By Nyquist's theorem we must have 2*14.5kHz=29kHz so 29,000 samples per second. 2048=2^11 so we have 11 bits per sample. Finally we have 29000*11 bits per second (bps) =319000=3.2 * 10^5
In this exercise we want to know how many bits will be transmitted between the two intelligences, so we have that:
[tex]3.2*10^5 bits[/tex]
What is the Nyquist's theorem?According to the theorem, the reconstructed signal will be equivalent to the original signal, respecting the condition that the original signal does not contain frequencies above or above this limit. This condition is called the Nyquist Criterion, or sometimes the Rahab Condition.
in this way we have:
[tex]2*14.5kHz=29kHz \\2048=2^11 =11 bits \\ 29000*11 =319000=3.2 * 10^5[/tex]
See more about bits at brainly.com/question/2545808