(1) Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output those four values on a single line separated by a space. (2 pts) Note: This zyLab outputs a newline after each user-input prompt. For convenience in the examples below, the user's input value is shown on the next line, but such values don't actually appear as output when the program runs. Enter integer: 99 Enter double: 3.77 Enter character: 2 Enter string: Howdy 99 3.77 z Howdy (2) Extend to also output in reverse (1 pt) Enter integer: 99 Enter double 3.77 Enter characteri Enter string: Howdy 99 3.772 Howdy Howdy z 3.77 99 (3) Extend to cast the double to an integer, and output that integer (2 pts) 0 en soa Enter integer: 99 Enter double: 3.77 Enter character: 2 Enter string: Howdy 99 3.77 z Howdy Howdy z 3.77 99 3.77 cast to an integer is 3 LAB ACTIVITY 14.1.1: Prog 1: Variables, input, and casting 0/5 BasicInput.java Load default template. 1 ort java.util.Scanner: 2 3 lic class Basic Input I 4 public static void main(String args) { 5 Scanner ser-new Scanner(System.in); 6 int userint; 7 double userDouble; B // FTOME Define chor and string variables similarly 9 char UserChar: 10 String userString: 11 12 System.out.println("Enter integer"): 13 user Int - ser.nextInto: 14 15 // FTXMC (1): Finish reading other items inte variables, then output the four values on a single line separated by a space

Answers

Answer 1

Answer:

import java.util.*;

public class Main{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

 int intgVal; double dblVal; char chrVal; String strVal;

 System.out.print("Enter integer: ");  

 intgVal = input.nextInt();

 System.out.print("Enter double: ");  

 dblVal = input.nextDouble();

 System.out.print("Enter character: ");  

 chrVal = input.next().charAt(0);

 input.nextLine();

 System.out.print("Enter string: ");  

 strVal = input.nextLine();

 System.out.println(intgVal+" "+dblVal+" "+chrVal+" "+strVal);

 System.out.println(strVal+" "+chrVal+" "+dblVal+" "+intgVal);

 int IntValue = (int) dblVal;

 System.out.print("Cast to an integer: "+IntValue);

}

}

Explanation:

See attachment for complete program where comments were used to explain each line of the program


Related Questions

What is it called when you remove some information from a file or remove a file from the disk ? A) save b) delete c) edit d) remove

Answers

Answer:

delete is the answer okkkkkkkkkkkkkkkk

Select the correct answer.
What do you understand by "exposition"?

Answers

Answer:

Exposition means a comprehensive description and explanation of an idea or theory.

Exposition is a passage in a piece of literature or a work that is used to introduce elements of the narrative, such as background information, settings, events, and characters to help the reader progress through the novel. Exposition is a way of showing or telling you what you need to know about the narrative in order to better understand what is going on or what the author wants you take away from the experience.

Swapping Order of Vowels Write a program to swap the order of the vowels in a given word. For example, if the word is programming, the output is prigrammong. Here, the initial order of vowels is o, a, i which changes to i, a, o. Assume that the letters of the words are in lowercase.

Answers

Answer:

Program is as follow:

Explanation:

#include<iostream.h>

#include < conio.h>

bool isVowel(char b)

{

return

( b=='a' || b=='A' || b=='e' || b=='E' || b=='i' || b=='I' || b=='o' || b=='O' || b== 'u' || b=='U');

For swaoing the vowels

string reverseVowel ( String str)

{

int j = 0;

string v ;

for ( int i= 0 ; str [i]]!='0'; i++)

if( isv(str[i]))

v[j++] = str[i[;

for ( int i = 0; str[i]! = '0' ; i++

if ( isv (str[i]))

str{i} = v [--j]

return str;

}

int main ()

{ string str = " Programming";

cout<<swapv(str);

return 0 ;

}

g Consider the turning point problem again, but this time you are given a sequence of at least three integers, which consists of a decreasing subsequence followed by an increasing subsequence. Using the divide and conquer technique, develop a recursive algorithm that finds the index of the turning point in the sequence (that is, the point where it transitions from a decreasing subsequence to an increasing subsequence). For example, in the sequence [43 30 16 10 7 8 13 22], the integer 7 is the turning point and its index is equal to 4 (assuming the starting index is 0). So, the algorithm should return 4

Answers

Answer:

Explanation:

The following code is written in Python, it creates a recursive function that takes in a list as a parameter, then compares the first two items in the list if the first is greater, it increases the index by one and calls the function again. This is done until the turning point is found, it then prints out the position of the turning point int the list.

def find_turning_point(list, x=0):

   if list[x] > list[x + 1]:

       x += 1

       return find_turning_point(list, x)

   else:

       return "The turning point position is: " + str(x)

A network administrator enters the service password-encryption command into the configuration mode of a router. What does this command accomplish?

Answers

Answer:

A network administrator enters the service password-encryption command into the configuration mode of a router. What does this command accomplish? This command prevents someone from viewing the running configuration passwords. You just studied 28 terms!

Antivirus is a program that detects error.True or False.​

Answers

Answer:  false

Explanation:

Because it isn't true.

It is for employees to make mistakes that compromise the security of an organization’s computer devices and sensitive information.

impossible
difficult
easy

Answers

Answer: Easy

Explanation: Correct on my Edg 2021.

It is simple for employees to make mistakes that jeopardize a company's computer system security and sensitive data.

What exactly is sensitive data?

Sensitive information has been defined as personal data that includes facts or opinions concerning a person's race or ethnicity. political affiliations or beliefs. beliefs in religion or philosophy. Data that needs to be shielded from unwanted access in order to protect the security or privacy of a person or organization is considered sensitive information.

Pattern-based classifiers called sensitive information types (SIT) are used. To see a complete list of all SITs, see Sensitive information types entity definitions. They look for sensitive information like social security, credit card, or bank account numbers to identify sensitive things.

Therefore, It is simple for employees to make mistakes that jeopardize a company's computer system security and sensitive data.

To know more about sensitive information visit;

brainly.com/question/26191875

#SPJ3

Your tasks include identifying competitors, determining your company's market penetration and consulting market research sources. These tasks are examples of:
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform this task are A to H and alt+1 to alt+9.
A

search engine optimization (SEO).
B

off-site Web analytics.
C

on-site Web analytics.
D

pay-per-click.

Answers

Answer:

B. off-site Web analytics.

Explanation:

Marketing can be defined as the process of developing promotional techniques and sales strategies by a firm, so as to enhance the availability of goods and services to meet the needs of the end users or consumers through advertising and market research. The pre-service strategies includes identifying the following target market, design, branding, market research, etc.

Market research can be defined as a strategic technique which typically involves the process of identifying, acquiring and analyzing informations about a business. It involves the use of product test, surveys, questionnaire, focus groups, interviews, etc.

Web analytics refers to a strategic process which typically involves the collection of data, as well as the study of user behavior in an attempt to enhance or boost market share and sales. It is divided into two main categories;

I. on-site Web analytics.

II. off-site Web analytics.

In this scenario, your tasks include identifying competitors, determining your company's market penetration and consulting market research sources. These tasks are examples of off-site Web analytics.

A routed interface placed in passive mode continues to send advertisements
for its dynamic routing protocol out the interface.
-True
-False

Answers

The answer is True.

HOW DO I CONNECT TO MY mysql server on my computer locally using php and also how to run it on the browser

Answers

Answer:

<?php

$mysqli = new mysqli("127.0.0.1:3307", "myUser", "myPass", "databasename");

$query = "SELECT * FROM users ORDER BY name";

if($result = $mysqli->query($query))

{

   echo '<ul>';

while ($obj = $result->fetch_object())

   {

       echo '<li>'.$obj->name.'</li>';

   }

   $result->free();

   echo '</ul>';

}

else

{

   die("nothing found");

}

$mysqli->Close();

?>

Explanation:

This should get you started.

Design a software system for a bookstore that keeps an inventory of two types of books: Traditional books and books on CD. Books on CD may also contain music. The bookstore purchases books from publishers and sets a price for each book. Customers can purchase books from the bookstore, using either cash or a credit. The bookstore keeps track of which books it has in its inventory, and the books purchased by each customer

a. What are the objects in your object- oriented Solution?
b. What are the interactions between objects in your solution?
c. Which objects "have" other objects?
d. Which Objects "Use" other objects?
e. Which objects are other objects?

Answers

Answer:

Explanation:

a. In this scenario, the best solution would have an Object of Traditional Books, CD, Music, Bookstore and Customer.

b. All five objects would be able to be called by the main program loop and the Customer Object would call upon and use either the Books or CD object, While the Bookstore object would call upon all of the other objects.

c. Both the Bookstore object and Customer object will "have" other objects as the Bookstore needs to hold information on every Book or CD in the Inventory. While the Customer object would call upon the Book and CD object that they are purchasing.

d. The Music Object will extend the CD object and use information on the CD object as its parent class.

e. Since the Music Object extends the CD object it is also considered a CD since it is in CD format like the Books on CD and therefore is both objects.

Add the following method to the Point class: public double distance(Point other) Returns the distance between the current Point object and the given other Point object. The distance between two points is equal to the square root of the sum of the squares of the differences of their x- and y-coordinates. In other words, the distance between two points (x1, y1) and (x2, y2) can be expressed as the square root of (x2 - x1)2 (y2 - y1)2. Two points with the same (x, y) coordinates should return a distance of 0.0.
public class Point {
int x;
int y;
// your code goes here
}

Answers

Answer:

public class Point

{

  public int x;

  public int y;

  Point(int x,int y)

  {

      this.x=x;

      this.y=y;

  }

  public static void main(String[] args)

  {

      Point p1=new Point(-2,3);

      Point p2=new Point(3,-4);

      System.out.println("distance:"+distance(p1,p2));

 }

  private static double distance(Point p1,Point p2)

  {

      return Math.sqrt(Math.pow(p2.x-p1.x, 2)+Math.pow(p2.y-p1.y, 2));

  }

}

Explanation:

The java program defines the Point class and the public method 'distance' to return the total distance between the two quadrants passed to it as arguments (they are both instances of the Point class).

PLEASE HELP ME WITH THIS PYTHON CODE::::: THANKS!!!



Lists are an example of a data abstraction.


A data abstraction can often contain different types of elements. It also provides a separation between the abstract properties of a data type (integer, boolean, string) and the concrete details of its representation. Basically, it doesn’t matter that the type are different!


Create an empty list. Append the integer 3, a string of "hello" and a boolean of False into the list. Print out each index individually. Now, remove the number 3 and False from the list.


Finally, print out the list again.

Answers

Answer:

Explanation:

The following Python code does exactly as requested. Once the list is created and the elements are added to it, it uses a for loop to print out each element individually. Then once the loop is over it removes the 3 and False elements from the list and creates another for loop to print the remaining element(s) individually again.

my_list = []

my_list.append(3)

my_list.append("hello")

my_list.append(False)

for x in my_list:

   print(x)

my_list.remove(3)

my_list.remove(False)

for x in my_list:

   print(x)

What is used to prevent all vlans from going across a trunk?

Answers

If you want to play Valorant with me my name is
Ticklemyguitar and my riot id is 2735

How does an online discussion group differ from one that is held face-to-face?

There is no need for group roles when holding online meetings.
Online discussion groups do not allow members to develop critical-thinking skills.
Group members are more likely to bond together as a group online than they would when meeting face-to-face.
Facilitating an online conversation may require even more work, so that participants continue engaging with one another online.

Answers

Answer: they always will have a different thinkage from others

Explanation:Some people need actual in person learning for better grades it also keeps them from getting distracted easily, they have different brains in everyone in the world everyone thinks, acts and talks in different ways some people dont need in person school because they would rather be online wich are both ok so yes they do bond together online but better in person.

Online discussion group differ from one that is held face-to-face as Group members are more likely to bond together as a group online than they would when meeting face-to-face. Thus, option C is correct.

What is software organization?

A system that defines how specific activities, in this case, the software development process, are directed to achieve corporate goals is referred to as an organizational structure. These activities could include putting rules, roles, and responsibilities in place.

There are four basic modes of collaboration, as illustrated by the exhibit "The Four Ways to Collaborate": a closed and authoritarian network (an elite circle), an open and hierarchical connectivity (an innovation mall), an open and flat network (an innovation community), and a shuttered and flat network (a consortium).

Groupware is software that allows a group of people to work together on the same system or application, regardless of where they are. Email, newsgroups, and many more are examples of groupware applications.

Thus, option C is correct.

For more details regarding collaborative applications, visit:

brainly.com/question/8453253

#SPJ3

Greedy Algorithm Design
A couple wants to buy n major items. They will buy one item per month. They will buy all of their items at the CrazySuperStore. Due to the current economy, it is known that at some point in the future there will be a single price hike on all items at the same time, but due to the uncertainty of economic processes, it is not known when that price hike will occur. For each of the n items the couple wants to buy, both the current price, ai and the future price, bi (bi > ai), are known. (Note that the individual price hikes on items may vary. For example, one item may go from $100 to $105 while another might go from $300 to $400. They only assumption you may make about the prices is that the second price is strictly higher than the first and that you have access to all before/after prices.) Devise a greedy strategy so that the couple is guaranteed to minimize the amount of money they spend on the items. Assume that no matter what, the couple will buy all items. Clearly describe your strategy and intuitively (or formally) prove why it's optimal.

Answers

Answer:

The algorithm is as follows:

1. Start

2. Get the number of items (n)

3. Get the current price of the n items (a1, a2..... an)

4. Get the possible hiked price of the n items (b1, b2..... bn)

5. Calculate the difference between the current and hiked prices for each item i.e. [tex]d_i = b_i - a_i[/tex]

6. Sort the differences in descending order (i.e. from the greatest to the least)

7. Buy items in this order of difference

8. Stop

Explanation:

The algorithm is self-explanatory; however, what it does is that:

It takes a list of the current price of items (say list a)

E.g: [tex]a = [100, 150, 160][/tex]

Then take a list of the hiked price of the items (say list b)

E.g: [tex]b = [110, 180, 165][/tex]

Next, it calculates the difference (d) between corresponding prices [tex]d_i = b_i - a_i[/tex]

[tex]d = [(110 - 100),(180-150),(165-160)][/tex]

[tex]d = [10,30,5][/tex]

Sort the difference from greatest to lowest (as the difference is sorted, lists a and b are also sorted)

[tex]d = [30,10,5][/tex]

[tex]a = [150, 100, 160][/tex]

[tex]b = [180, 110, 165][/tex]

If there is no hike up to item k, the couple would have saved (i = 1 to d[k-1])

Assume k = 3

The couple would have saved for 2 item

[tex]Savings = d[1] + d[2][/tex]

[tex]Savings = 30 +10[/tex]

[tex]Savings = 40[/tex]

The saved amount will then be added to the kth item in list a i.e. a[k](in this case k = 3) in order to buy b[k]

Using the assumed value of k

[tex]a[k] = a[3][/tex]

[tex]a[3] = 160[/tex]

[tex]b[3] = 165[/tex]

Add the saved amount (40) to a[3]

[tex]New\ Amount = 40 + 160[/tex]

[tex]New\ Amount = 200[/tex]

This new amount can then be used to buy b[3] i.e. 165, then they save the change for subsequent items

In QBasic, create a number guessing challenge. Your program should generate a random number from 1-
100 (inclusive). Let the user guess a number. The program should let the user guess until they get the
correct number. After each input, the program should tell the user whether they guessed the correct
number, or if they guessed too high or too low. While the user is entering guesses, the program should
keep a count of the number of guesses that it takes to get the correct number. After the user guesses
the correct number, the program should congratulate the user and tell them how many guesses it took
them to get the correct number. By the way, if the user chooses carefully, they should be able to guess
the number within 7 tries. But, your program should still let the user keep guessing until they guess the
correct number

Answers

Answer:

yes

Explanation:

The Binder Prime Company wants to recognize the employee who sold the most of its products during a specified period. Write a query to display the employee number, employee first name, employee last name, email address, and total units sold for the employee who sold the most Binder Prime brand products between November 1, 2017, and December 5, 2017. If there is a tie for most units sold, sort the output by employee last name

Answers

The answer will be one month

What will be the output of using the element in the given HTML code?



1011 2


A.
10112
B.
10112
C.
21011
D.
21011

Answers

Answer:

i think c.

Explanation:

Answer:

Answer is B: 1011 with the two under

Explanation:

I got it right on plato

can you help me with this question please ​

Answers

d. half period because it is the converting of bidirectional current flow to unidirectional currency flow.

we are writing a program that takes a word and checks how many letters​

Answers

Answer:

def word_count(word):

return len(word)

a = word_count('scream')

print(a

Explanation:

Using python3:

def word_count(word):

#defines a function named word_count which takes in a single argument which is the word to be counted

return len(word)

#The only thing the function does is to count the number letters in the word.

For instance :

return len(word)

Calling the function and attaching it to the variable named a

Counts the number of letters in scream and assigns the result to a

a = word_count('scream')

print(a)

a gives an output of 6 ; which is the number of letters in scream.

Assume that you have implemented a sequence class. Describe the mySequence object (i.e., items with the correct order and the position of the current index) after each line of the following code
sequence mySequence;
mySequence.insert(3)
mySequence.insert(2);
mySequence.attach(10);
mySequece.advance();
mySequence.attach(11);
mySequence.insert(4);
mySequence.insert(6);
mySequece.advance();
mySequence.remove_current();
mySequence.insert(9);

Answers

Answer:

The final sequence is:  2 10 3 6 9(c) 11

Explanation:

The first line of code creates the sequence object "mySequence". Every insert() method inserts the item before the current item to make a new current item. The attach() method adds a new current item after the previous current item. The advance() method makes the next item to the current item the new current item.

The remove_current method of the sequence object removes the current item of the sequence.

A mathematical process of coding information so that only the intend user can read it

Answers

Answer:

asymmetric encryption with the intended user's public key.

Explanation:

Only that user will be able to decrypt the information.


Describe the major elements and issues with system prototyping​

Answers

Answer:

Pic attached...

Hope it helps!!!

A palindrome is a string that is the same when read left to right as when read right to left. Write a program that determines if an arbitrary string is a palindrome. Assume that the string can have blanks, punctuation, capital letters and lower case.

Answers

Answer:

In Python:

strng = input("String: ")

revstrng = strng[::-1]

if strng == revstrng:

   print("True")

else:

   print("False")

Explanation:

This prompts user for string input

strng = input("String: ")

This reverses the string input by the user

revstrng = strng[::-1]

This checks if strings and the reverse string are equal

if strng == revstrng:

Prints True, if yes

   print("True")

Prints False, if otherwise

else:

   print("False")

Match the OOP concept to its definition.
encapsulation
data abstraction
inheritance
derived class
defines a class in terms of another class
arrowRight
inherits the properties of a base class
arrowRight
provides only essential information to the world
arrowRight
binds data and functions together
arrowRight

Answers

Answer:

defines a class in terms of another class = inheritance

inherits the properties of a base class = derived class

provides only essential information to the world = data abstraction

binds data and functions together = encapsulation

Explanation:

2.5 lesson practice edhesive

Answers

Answer:

Huh,.......? what.....?

Answer:

1. They are contained in the math module.

2. 0, 1, ... 7

3. 0.0 <= r < 5

Explanation:

You were just hired as an IT Specialist for Smalltown School District. Your first assignment is to review a problem area& in student records processing. It seems that the program currently used to compute student grade point averages and class rankings runs terribly slow and as a result end of year reports are habitually late. Your are asked to come up with a list of items that should be checked in order to determine if a modification to code is in order. The IT department head is asking you to do this without the opportunity to actually see the current application/programs in use. What questions would you ask about the current code? What areas of code would you look at? What would you need to know about the student data?

Answers

Answer:

Explanation:

There are various questions that you can ask in this scenario, such as

What grading policies are being implemented?

How many student grades are being calculated by the program?

What is the requirements for a student to pass?

All of these questions would allow you to get an idea of how extensive the code may be and its complexity. Once you know this you would look at the code revolving around actually looping through the data and doing the necessary calculations. You can then determine how to manipulate the code and make it much more efficient.

You would also need to know how the student data is being saved, which will help determine if it is the best data structure for saving this type of data or if it can be replaced in order to maintain the data secure while increasing the speed of the program. Mainly since this information needs to be continuously used from the data structure.

how to delete the last element in array

Answers

Answer:

Hey mate.....

Explanation:

This is ur answer.....

To remove the last n elements from an array, use arr. splice(-n) (note the "p" in "splice"). The return value will be a new array containing the removed elements.

Hope it helps!

Mark me brainliest pls.....

FOLLOW ME! :)

Why did Elena Gilbert Turn her humanity off when she was sired to Damon? (In The Vampire Diaries)

Answers

Answer:

Ok, so when her brother died she couldn't take it and was in denial for like the longest time. And since she was still sired to Damon bofre her humanity was off she could still listen to him.

Explanation:

Other Questions
Can someone please help meeeeee??!! what is conductor?give two examples. Toni bought 5 t-shirts for $35 . Each shirts cost the same amount "After 20 Years"PART B: Which of the following quotes best supports the answer to Part A? Please help, will mark brainliest. How many times greater is 9 x 105 than 8 x 102? Three friends share 4 packs of Expo Markers.How much of the pack will each friendreceive? Find the mean of the data in the pictograph below How might the middle layer contribute to your understanding of the history rock layers how certain can you be dont answer in a link please i cannot access them. anyways do you guys remember this or is it made up..? it goes to the xxxtentacion beat she wonders why. i dont trust nobody but i got good reasoning turnin up the speakers to make sure you feeling it recently ive been keeping to myself i've been secretive not that ive got anything to hide im just keeping it. everything i do i just tore apart my heart opened up myself when i knew it wasn't smart this boy played me broke then dipped peace out got pic then said .... it thought this was real this time now broken cuz i thought he wanted to be mine. these are all mind games fake as .... never matter shoulda known not to trust no one when they cant even trust me enough! if you dont remember it i may have came up with in a dream and make it a actual thing Which of the following would be a good place for the writer of the op-ed tolink to additional information on the Internet?A. The damage to the environmentB. Carted off as trashC. According to a recent article in the Westridge Daily NewsD. From any perspective How many X chromosomes do males have in somatic cells? Please right a narrative about a stormy night please Find the missing exponent.100Stubmit Pls help with these questions.Thanks, will give Brainliestand don't give me links, cus I will report you, and ban you. 1 A puppy named Fuzzy started out at 3 pounds and gained 1/4 pounds every month. Therelationship between the age in months x and the weight y, can be expressed using the equation Y = 1/4 x + 31.) Which expression represents the slope in this context?A) 3B) 1/3C) 4D) 1/4 if we're to have superpowers what would they be (PLEASE HELP ME ASAP)Andrea spins the arrow on the spinner one time.What is the probability that the arrow will land on a part of the circle that has a star? Need help please I'm not sure if I'm right identify the four types of tissues that make up the human bodyPLS HELP !!!!!