(Find the number of days in a month) Write a program that prompts the user to enter the month and year and displays the number of days in the month. For example, if the user entered month 2 and year 2000, the program should display that February 2000 has 29 days. If the user entered month 3 and year 2005, the program should display that March 2005 has 31 days

Answers

Answer 1

Answer:

// here is code in java.

import java.util.*;

// class definition

public class Main

{

public static void main(String[] args) {

    // scanner object to read input from user

    Scanner s=new Scanner(System.in);

    // array of months

  String mon[] ={

       null , "January" , "February" , "March" , "April", "May",

       "June", "July", "August", "September", "October",

       "November", "December"};

       // array which store number of days corresponding to months

       int days[]={0,31,28,31,30,31,30,31,31,30,31,30,31};

       // ask user to enter month

       System.out.print("enter the month:");

       // read month

      int m=s.nextInt();

      // ask user to enter year

       System.out.print("enter the year:");

       // read year

      int year=s.nextInt();

      // check the leap year

      if(m==2 &&(((year % 4 == 0) && (year % 100!= 0)) || (year%400 == 0)))

      {

          System.out.println(mon[m]+" "+year+" has 29 days.");

      }

      else

      System.out.println(mon[m]+" "+year+" has "+days[m]+" days");    

}

}

Explanation:

Declare and initial month array and days array.Then read the month and year From user with the scanner object.Check if entered year is a leap year or not.Then based on the year and month print the number of days .

Output:

enter the month:2                                                                                                                                            

enter the year:2000                                                                                                                                          

February 2000 has 29 days.

enter the month:3                                                                                                                                            

enter the year:2005                                                                                                                                          

March 2005 has 31 days.

Answer 2

Final answer:

To determine the number of days in a month, one must consider the regular pattern where most months have 30 or 31 days and February has 28 or 29 days depending on whether it is a leap year. A program can be written to take a user's input for month and year and then calculate and display the correct number of days using validation for leap years and the known month lengths.

Explanation:

To create a program that displays the number of days in a month based on user input of the month and year, one must consider the irregularities of the Gregorian calendar. The program should take into account that most months have at least 30 days, except February, which has 28 days in a common year and 29 days in a leap year. A leap year occurs every four years, except in cases where the year is divisible by 100 but not by 400. Thus, years like 2000 and 2400 are leap years, but 1900 and 2100 are not.

A mnemonic that can help remember the number of days in each month is: 'Thirty days hath September, April, June, and November. All the rest have thirty-one, save the second one alone, which has four and twenty-four, till leap year gives it one day more.' Additionally, the 'knuckle mnemonic' can be used, where protruding knuckles represent months with 31 days and the spaces in between represent shorter months.

Example Program in Python:

month = int(input('Enter month (1-12): '))
year = int(input('Enter year: '))
if month in (4, 6, 9, 11):
   days = 30
elif month == 2:
   if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
       days = 29
   else:
       days = 28
else:
   days = 31
print('Number of days: ', days)

This basic Python program prompts the user for the month and year and then prints out the correct number of days in that month, considering whether it is a leap year for February.


Related Questions

________If your program compiles successfully, it will produce correct results. (T/F)

Answers

Answer:

False.

Explanation:

It is not compulsory that if the program is compiled successfully it will produce correct result.Suppose if the syntax in the code is all correct but the logic behind the code is wrong or there is a logic error in the program .So the program is certain to give wrong results.

Hence the answer is False.

. How do you find and remove files whose names contain embedded spaces? What would the Linux command(s) be?

Answers

Answer:

The Linux command is find.

Explanation:

The Linux command find suffices for finding and removing files whose names contain embedded spaces.

The command find supports tests of different kinds and predefined (and user-defined) actions in conjunction like that one looking for files with embedded spaces and then delete them.

We can achieve this using the following piece of code (as example):

find . -regex '.* +.*' -delete

The command find will look for files in the current working directory ( . ), execute the test -regex, to evaluate files in the current directory using the case-sensitive regular expression test (regex) (it could be also -iregex) that evaluates those files having names with one or more embedded spaces ( +)  between zero or more characters before (.*) and after (.*) of these embedded space(s) ( +).  

Look carefully that one or more embedded spaces is (are) represented in regular expressions using a space before the metacharacter (+),  and characters are represented using the metacharacter (.) before (*), that is, (.*)

In other words, the quantifier (+) represents one or more occurrences (or matches) and quantifier metacharacter (*) zero or more times cases for that evaluation.

So, after testing all files available in the current directory with -regex test, find will execute the action -delete for all files matching the result of such an evaluation (and finally obtaining what we are looking for).

The command find has several other tests (-name, -iname, -ctime, and many more) that can be used with logical operators (-and, -or, -not), some predefined actions like -delete (aforementioned), -ls (list), -print and -quit, and also offers possibilities for user-defined actions, as mentioned before.

-Define three types of user mode to kernel mode transfers?

Answers

Answer:

 The three types of user mode to the kernel mode transferred occurred due to the:

It is mainly occurred due to the interrupt when, it send to the central processing unit (CPU).It also occurs due to the hardware exception and when the memory is access illegally as it is divided by the zero. It is mainly implemented or executed by the trap instruction as the system are basically executed by the program.
Final answer:

User mode to kernel mode transfers can happen through system calls, hardware interrupts, and software interrupts, allowing a user-level program to request kernel-level operations.

Explanation:User Mode to Kernel Mode Transfers

In computer systems, user mode to kernel mode transfers can occur through three primary mechanisms. These are system calls, hardware interrupts, and software interrupts. A system call is a programmed request to the kernel for a service performed by the operating system that a normal user program is not allowed to do. This is an intended interaction. A hardware interrupt is an asynchronous signal from hardware to the processor requesting attention; it causes the CPU to switch from user mode to kernel mode to handle the event. Lastly, a software interrupt is triggered by executing a specific instruction which intentional causes the processor to enter kernel mode for executing low-level routines that are not accessible in user mode.

Discuss the purpose of Javadoc.

Answers

Answer: Javadoc is type of tool that is used for reading the comments that are formatted in Java source code. It helps in the production of the Java code documentation from these java codes in the HTML(hyper test markup language).

The purpose it serves is changing the API documents into the HTML code documentation or HTML web pages.This service is used while programming takes place.

What is the management part of a dashboard?

Answers

Answer:

 The management dashboard is the visual and display the KPI ( Key performance indicator) and metrics for monitoring the specific process and department.

It is basically used for checking whether the organization achieve or meet its specific goals not as per the requirement of the particular department in the organization.

The main part of the management dashboard is that it provide the visibility and alignment in the particular organization so that it meets according to the requirements of the organization. The basic requirement in the organization are:

Business user Organization needsInformation technology (IT) needs

Final answer:

The management part of a dashboard offers tools for monitoring, analyzing, and reporting on business performance, including real-time data, customizable widgets, and interactive features to strategically manage operations.

Explanation:

The management part of a dashboard is critical to business operations as it provides a visual representation of key performance indicators (KPIs) and metrics to help managers make informed decisions. This component typically includes tools and functionalities that allow for monitoring, analyzing, and reporting on various aspects of business performance.

Dashboards can also feature real-time data updates, customizable widgets, and interactive capabilities to manage operations effectively. For instance, a sales dashboard may contain management features like tracking sales targets, customer acquisition costs, and response times to customer inquiries, which enable leaders to manage their teams and resources strategically.

an index purports to speed data retrieval. you, therefore, index every attribute in each table. select the likely consequence.

a. you optimize data retrieval by using a WHERE statement in your SELECT query.

b. data entry slows as every INSERT , UPDATE, or DELETE statement must also update every index.

c. data retrieval on the Gender column is optimized

d. this technique eliminates the need for a primary key

Answers

Answer:

b. data entry slows as every INSERT , UPDATE, or DELETE statement must also update every index.

Explanation:

This process help to improve the speed of get data , it takes each element in the indexed column and save the location to get faster the data. But if you index every attribute in a table it going to take a lot of time locating each column in the respective index in each query(update, delete and insert). For that reason is necesary be carefull with this process and only put index in the relevant columns

Consider a class ClassName whose methods are listed below. What class is it?

ClassName(){...}
boolean isEmpty(){...}
void display(){...}
boolean search(int x){...}
void insert(int i){...}
void remove(int x){...}

Answers

Answer:

An implementation of java.util.List interface

Explanation:

Given class consists of the following constructs:

ConstructorisEmpty,search, displayinsert,remove

It supports inserting and removing an element at a specified index. It also supports search and display operations.

These are characteristics of an object which implements the java.util.List interface ( For example: ArrayList or user-defined customList ).

Write a class definition for a student. It should have student ID and student name. Include the mutator and accessor functions for both of those member variables.

Answers

Answer:

class student {

   private:

   int studentID;

   string student_name;

   public:

   int getID() // accessor...

   {

       return studentID;

   }

   string getname()  //accessor...

   {

       return student_name;

   }

   void setvalues(int ID,string name)  //mutator..

   {

       studentID=ID;

       student_name=name;

   }

};

Explanation:

The above written class is in C++.I have created two private members student_ID and student_name.Two accessor function getname and getID and one mutator function setvalues and these functions are public.

Implements the sequential search method that takes and array of integers and the item to be search as parameters and returns true if the item to be searched in the array, return false otherwise

Answers

Answer:

// here is code in java.

import java.util.*;

// class definition

class Solution

{

   // function to perform sequential search

  public static boolean item_search(int [] arr,int k)

  {

      boolean flag=false;

      for(int a=0;a<arr.length;a++)

      {

       // if item found then return true,else false

          if (arr[a]==k)

          {

              flag=true;

              break;

          }

      }

      return flag;

  }

   // main method of the classs

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // variables

       int size,item;

 // scanner object to read input from user

Scanner scr=new Scanner(System.in);

//ask user to enter size

System.out.println("size of array:");

 // read the size of array

size=scr.nextInt();

 // create an array of given size

int inp_arr[]=new int[size];

System.out.println("enter the elements of array:");

 // read the elements of the array

for(int x=0;x<size;x++)

{

    inp_arr[x]=scr.nextInt();

}

System.out.println("enter the item to search:");

 // read the item to be searched

item=scr.nextInt();

 // call the function with array and item as arguments

System.out.println(item_search(inp_arr,item));

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read the size of array.Then create an array of the given size.Read the elements of the array.Then read the item to be searched.Call the method item_search() with array and item as arguments.Here check all the elements, whether the item is equal to any of the element of array or not.If any element is equal to item then method will return true otherwise return false.

Output:

size of array:5

enter the elements of array:3 6 1 8 9

enter the item to search:8

true

What are the uses of the tracrt and ping commands and what information is provided by each.

Answers

Answer:

The ping command is used to test the ability of a source computer to reach a specified destination computer. This command is used to verify if the sender computer can communicate with another computer or network device in the network.

The tracert command is used to show the details about the path sending a packet from the computer to whatever destination you specify.

Create an array from 0 to 10 by steps of 0.5

Answers

Answer:

#here is code in python

#import numpy library

import numpy as np

#create an array from 0 to 10 by steps of 0.5

ar=np.arange(0,10.5,0.5)

#print the array

print(ar)

Explanation:

Import the numpy library as alias "np".Then np.arange() function will call with three parameter to create an array.Here first parameter is start and goes till second parameter -increment.Here 3rd parameter is increment.It will create the array and assign it to "ar".Print the array.

Output:

[ 0.   0.5  1.   1.5  2.   2.5  3.   3.5  4.   4.5  5.

 5.5  6.   6.5 7.   7.5  8.   8.5  9.   9.5 10. ]

The if/else if statement is actually a form of the __________ if statement.

Answers

Answer:

The answer to this question is "nested".

Explanation:

The answer to this question is nested because, In programming languages, there is a concept of nested if-else statement. In nested if-else statement placing if statement inside another IF Statement that is known as nested If in C Programming.

Example of nested if can be given as

#include <stdio.h>

int main()

{

  int a,b,c;

printf("Enter 3 number\n");

scanf("%d",&a);

scanf("%d",&b);

scanf("%d",&c);

   if(a>b)

   {

    if(a>c)

    {

        printf("A is greater: %d",a);

    }

   }

   else

   {

       if(b>c)

       {

           printf("B is greater: %d",b);

       }

       else

       {

           printf("C is greater: %d",c);  

       }

   }

   return 0;

}

output:

Enter 3 number  

4

7

9

c is greater: 9

) Printing odd numbers. Write Python code that asks the user for a positive number, then prints all the odd numbers from 0 to the number provided by the user. For example, if the user provides the number 7, then you should print the values: 1 3 5 7 *You can use 'range()' with three numbers.

Answers

Answer:

#here is code in Python

#read the value of n

n=int(input("enter a number:"))

#print all the odd numbers

for i in range (1,n+1,2):

   print(i,end = '')

Explanation:

Read a number from user and assign it to variable "n".Then use a for loop to print all the odd numbers from 1 to n.We can use range() function to print this. here first number is starting of the range and second will be the end of the range. and 3rd one is the Increment to the iterator.

For example In the above code, 1 is the start point and n+1 will be the last. Here

loop will run till n only.Every time value of "i" is increased by 2.

Output:

enter a number:15

1 3 5 7 9 11 13 15

Write a complete Java program called Stewie2 that prints the following output. Use at least one static method besides main. ////////////////////// || Victory is mine! || \\\\\\\\\\\\\\\\\\\\\\ || Victory is mine! || \\\\\\\\\\\\\\\\\\\\\\ || Victory is mine! || \\\\\\\\\\\\\\\\\\\\\\ || Victory is mine! || \\\\\\\\\\\\\\\\\\\\\\ || Victory is mine! ||

Answers

Answer:

// here is code in java.

import java.util.*;

// class definition

class Solution

{

// main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // declare and initialize string pattern

       String patt1="//////////////////////";

        // declare and initialize string pattern

       String patt2="|| Victory is mine! ||";

       // both patterns are printed alternatively

       for(int x=0;x<10;x++)

       {

        // first print pattern 1

           if(x%2==0)

           System.out.println(patt1);

            // then print second pattern

           else

           System.out.println(patt2);

       }

   }catch(Exception ex){

       return;}

}

}

Explanation:

Declare and initialize two strings patterns.As there are first pattern on every even line and second pattern on odd line. Run the loop for 10 time and print the pattern based on the position of lines.

Output:

//////////////////////

|| Victory is mine! ||

//////////////////////

|| Victory is mine! ||

//////////////////////

|| Victory is mine! ||

//////////////////////

|| Victory is mine! ||

//////////////////////

|| Victory is mine! ||

___ causes pain in the forearms due to swelling and pressure on the median nerve passing through the wrist.
Carpal tunnel syndrome
CVS
Tunnel syndrome
RSI

Answers

Answer:

Carpal Tunnel Syndrome.

Explanation:

Carpal Tunnel Syndrome is a very common condition in human beings.If you have carpal tunnel syndrome then you are very likely to feel pain ,tingling,numbness in the arm and hand.

Carpal Tunnel Syndrome happens because of swelling and pressure on one of the major nerves to the hand called the median nerve.

Convert 311 from decimal to hexadecimal. Show your work.

Answers

Answer:

(311)₁₀ = (137)₁₆

Explanation:

To convert a base 10 or decimal number to base 16 or hexadecimal number we have to repeatedly divide the decimal number by 16 until  it becomes zero and write the remainders in the reverse direction of obtaining them.

311/16 = 19 remainder=7

19/16=1 remainder = 3

1/16 remainder = 1

Writing the remainder in the reverse direction that is (137)₁₆.

Hence the answer is 137.

. Write a short program that asks the user to input a string, and then outputs the

number of characters in the string.

Answers

Answer:

// program in java.

// package

import java.util.*;

// class definition

class Main

{

// main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // object to read input from user

Scanner scr=new Scanner(System.in);

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

 // read input

String myString=scr.nextLine();

 // variable to store characters count

int char_count=0;

 // count the characters

for(int i = 0; i < myString.length(); i++) {

           if(myString.charAt(i) != ' ')

               char_count++;

       }

       // print the number of character

System.out.println("total characters in the String: "+char_count);

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read a string from user with the help of Scanner object and assign it to variable "myString".Iterate over the string and if character is not space (' ') then char_count++. After the loop print the number of characters in the string.

Output:

Enter a string:hello world

total characters in the String: 10

Write a function named delete Letter that has 2 parameters. The first parameter is a string, the second parameter is an integer. The function removes the character located at the position specified by the integer parameter from the string. For example, if the function is being called with the following statement: deleteLetter ("timetable", 3); the string will become "tietable", where the third character, 'm' has been removed.

Answers

Answer:

//import package

import java.util.*;

// class name

class Solution

{

// method to remove the character at given index

public  static void deleteLetter(String st,int in)

{

// remove the character at index in

 st=st.substring(0,in-1)+st.substring(in);

 System.out.println(st);

}

// main method of class

public static void main (String[] args) throws java.lang.Exception

{

   try{

//scanner object to read input

   Scanner scr=new Scanner(System.in);

// read string

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

                    String st=scr.nextLine();

// read index

  System.out.print("Enter the index:");

  int in=scr.nextInt();

// call method

  deleteLetter(st,in);

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read a string with the help of Scanner object.Then read the index of character to be remove.Call the method deleteLetter() with parameter string and index.It will make substring from 0 to "in-1" and "in" to last of the string.Then add both the string.This will be the required string.

Output:

Enter the string:timetable

Enter the index:3

tietable

Which of the following is not a command for determining if MySQL is running on Linux (Ubuntu)?
(a) sudo service mysql status
(b) ps -ef | grep 'mysql'
(c) sudo check status mysql
(d) sudo systemctl status mysql

Answers

Answer:

(c) sudo check status mysql

Explanation:

The commands service, ps and systemctl, are different ways to find out if MySQL is running on Linux (Ubuntu), but there is not such a command called check to do so in Linux.

Different programs in Linux operating system are organized in processes, and they are all created for a specific purpose: running an application, starting a web browser, and so on.

Some other programs like the init program start and stop essential service processes and there are currently two major implementations in Linux distributions:

System V init (traditional implementation)systemd (emerging standard for init).

The commands service and systemctl are related to System V init and systemd, respectively, and can list the status of a program.

Thus, the command service can list if MySQL is running on Linux using the piece of code in the question: sudo service mysql status.

Likewise, the command systemctl can activate and deactivate services, and, among many other functionalities, list the status of a program (like the one in the question: systemctl status mysql).

The command ps (process status) "displays information about a selection of the active processes" [ps man page]. The command has many options, and some are -e (select all processes) and -f (full-format listing). In this case, the command output is piped to grep (global regular expression print) command to find those processes mainly related to 'mysql'.

It is important to remember that command sudo (superuser do) permits a user to "execute a command as the superuser or another user" [sudo man page], since commands service and systemctl require privileges to be run, for security reasons.

What is the return type of writeDouble( double d ), a method of RandomAccessFile.
a) void b) int c) float d) double f ) boolean g) file object h) none

Answers

Answer:

The answer is h) none.

Explanation:

The RandomAccessFile.writeDouble(double d) method does not return any value, it converts the double d value into a long type and then, writes it into a file as an eight-byte quantity. So, the method does not return any value but creates a file object.

Optimally, the __________ guides investment decisions and decisions on how ISs will be developed, acquired, and/or implemented.
a. network infrastructure
b. SWOT
c. level of IT expertise
d. IT strategy

Answers

Answer: IT strategy

Explanation: IT(Information technology) strategy is the planning that is used in any particular organization for the  management of the resources, functions, operation etc to make sure that stakeholders, employees etc have the same aim of working. This method helps in sustainability and achieving the goals.

Other options are incorrect because network infrastructure is the structure made by the network nodes, SWOT(strength, weakness, opportunities and threats) analysis for the analyzation of organization or person, IT expertise level defines the stages persisting particular skills.Thus the correct option is IT strategy.

. A collection of programs designed to create and manage databases is called a(n))

Answers

Answer:

Database Management System.

Explanation:

Database Management System is the collection of programs and data used to create ,define and manipulate the database.

There are several database management systems present and some of them are as following:-

RDBMS (Relational Database Management System)No SQL DBMSCDBMS(Columnar Database Management System).IMDBMS(In-Memory Database Management System).

What is the Matlab command to create a vector of the even whole numbers between 29 and 73?

Answers

Answer:

x = 29:73;

x_even = x(2:2:end);

Explanation:

In order to create a vector in Matlab you can use colon notation:

x = j:k

where j is 29 and k is 73 in your case:

x = 29:73

Then you can extract the even numbers by extracting the numbers with even index (2,4,6,etc.) of your vector:

x_even = x(2:2:end);

In the line of code above, we define x_even as all the elements of x with even index from index 2 till the end index of your vector, and an increment of 2 in the index: 2,4,6,etc.

If you want the odd numbers, just use the odd indices of your vector:

x_odd = x(1:2:end);

where x_odd contains all the elements of x with odd index from index 1 till the end index, and an increment of 2: 1,3,5,etc.

Write a program that converts a temperature in Fahrenheit to temperature in Centigrade. The program will ask the user to enter a temperature in Fahrenheit as a decimal number. It will then display the same temperature in Centigrade as a decimal number. See Testing section below for test data.

Answers

Answer:

// here is program in java to convert Fahrenheit to equivalent Centigrade.

// import package

import java.util.*;

// class definition

class Main

{

   // main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // object to read value from user

    Scanner scr=new Scanner(System.in);

    // ask to enter temperature in Fahrenheit

       System.out.print("enter rented minutes: ");

       // read temperature in Fahrenheit

       int temp_f=scr.nextInt();

       // convert Fahrenheit to Centigrade

       double cen=(temp_f-32)/1.8;

       // print the temperature

       System.out.println(temp_f+" Fahrenheit is equal to "+cen+" Centigrade");

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read temperature in Fahrenheit from user and assign it to variable "temp_f". To convert the temperature to equivalent Centigrade, first subtract 32 from Fahrenheit and then divide it by 1.8 .This will give equivalent temperature in Centigrade.

Output:

enter rented minutes: 100

100 Fahrenheit is equal to 37.77777777777778 Centigrade

Which of the following describes a poor design consideration for a form?

Arrange controls closely together or in a sequence that is easy to read by the user.
Each form should have a different theme.
Make labels descriptive and clear.
Right-align labels followed by a colon and left-align bound controls.

Answers

Answer: Each form should have a different theme.

Explanation: Form is display of requirement for presenting the application having a specific data in it with label.It is made with certain specifications to fulfill the purpose .

The considerations for the designing of form are accessing by the client,clear requirement for designing,layout ,security access provision, purposes like read only etc.

All the considerations mentioned in the question are correct except the different theme belonging to form.The theme or subject depends on the information that the form is based on.The data provided by the form should be precise, sequential and labeled in order to make it informative. So, different theme is the poor consideration for form designing.

What is your understanding of the difference between an unconditionally secure cipher and a computationally secure cipher?

Answers

Answer:

  The unconditionally secured is basically define as, the cipher content produced by the plan that doesn't contain enough data to decide the comparing plain message ,regardless of what number of figure content is accessible.

It is basically used to determine the uniquely plain content without knowing the actual availability of the cipher.

The computationally secure cipher is the encryption scheme which is basically required the time for breaking the cipher which exceeds the helpfulness lifetime of that data.  The expense of breaking the figure surpasses the estimation of scrambled data

A logical DFD shows:

Select one:

a. how a process is performed.

b. the groups of entities logically involved in a business process.

c. the methods for performing activities in a process.

d. the logical grouping of activities in a business process.

e. none of the above.

Answers

Answer:d)the logical grouping of activities in a business process.

Explanation: The logical data flow diagram is the diagram that displays or represents the business related activities.They has easily understandable concept which can be acknowledged by technical as well as non-technical people.They help in providing the data/information by connecting and communicating.

Other options are incorrect because it does not show the process or methods for performing activities neither it works in the form of entities collection in a business..Thus the correct option is option (d).

Which method call converts the value in variable stringVariable to an integer?

Integer.parseInt( stringVariable );
Convert.toInt( stringVariable );
Convert.parseInt( stringVariable );
Integer.toInt( stringVariable );

Answers

Answer:

The correct answer for the given question is Integer.parseInt( string variable );

Explanation:

Integer.parseInt( string variable ); is the method in a java programming language that convert the string into the integer value. It takes a string variable and converted into the integer.

Following are the program in java which convert the string value into an integer value.

class Main  

{

 public static void main(String []args) // main function

{

   String str1 = "10009";

// variable declaration

   int k = Integer.parseInt(str1);

// convert the string into integer.

   System.out.println("Converted into Int:" + k);

}

}

Output:

Converted into Int:10009

Convert.toInt( stringVariable );

Convert.parseInt( stringVariable,Integer.toInt( stringVariable ); are not any method to convert the string into integer .

Therefore the correct answer is :Integer.parseInt( stringVariable );

. The __________ is a set of recommended or best practices for organizations using payment cards.

Answers

Answer: Payment card industry data security standard (PCI DSS)

Explanation:

 The PCI DSS is the set of standard policies that basically used in the organization for the purpose of payment cards.

The PCI DSS was basically created in the 2004 by the major credit card company that is american express ,visa and master card. It provide the procedure for optimize the credit and debit card security. It also protect the cardholders from the misuse for their personal data or information.

It basically maintain the secure network so that the transaction can be easily conducted.

how to determine if f(x)= -3x+4 from real numbers to real numbers is injective, surjective, or bijective

Answers

Answer:

The function is injective.

The function is surjective.

The function is bijective.

Explanation:

A function f(x) is injective if, and only if, a = b when f(a) = f(b).

So:

[tex]f(x) = -3x + 4[/tex]

[tex]f(a) = f(b)[/tex]

[tex]-3a + 4 = -3b + 4[/tex]

[tex]-3a = -3b[/tex] *(-1)

[tex]3a = 3b[/tex]

[tex]a = \frac{3b}{3}[/tex]

[tex]a = b[/tex]

Since [tex]f(a) = f(b)[/tex] if, and only if, [tex]a = b[/tex], the function is injective.

A function f(x) is surjective, if, and only if, for each value of y, there is a value of x such that f(x) = y.

Here we have:

[tex]f(x) = y[/tex]

[tex]y = -3x + 4[/tex]

[tex]3x = 4-y[/tex]

[tex]x = \frac{4 - y}{3}[/tex]

The domain of x is the real numbers, which means that for each value of y, there is a value of x such that [tex]f(x) = y[/tex]. So, the function is surjective.

A function f(x) is bijective when it is both injective and surjective. So this function is bijective.

Other Questions
Q1: For the purposes of this course, the Southwest region is defined as:a. extending from the California coast to far eastern Texas.b. the rugged and arid interior of the southwestern contiguous U. S. and adjoining areas of Mxico.c. all desert areas of North America at elevations of 1500 m (5000 ft) or lower.d. the area of the southwestern contiguous U. S. with the highest proportion of Spanish-language speakers. Which process is most directly driven by light energy?(A) creation of a pH gradient by pumping protons across the thylakoid membrane(B) reduction of NADP+ molecules(C) transfer of energy from pigment molecule to pigment molecule(D) ATP synthesis An adaptive trait: (mark all that apply)[a] varies in its characteristics according to local environmental circumstances[b] becomes common within a species through natural selection[c] means that a species gets better over time[d] tends to promote the well being of an organism in its natural or social environment[e] confers on its possessor greater fitness relative to those who lack it In a simple ideal Rankine cycle, water is used as the working fluid. The cycle operates with pressures of 2000 psi in the boiler and 4 psi in the condenser. What is the minimum temperature required at the turbine inlet, so that the quality of the steam at the turbine outlet is not less than 85%. What would be the thermal efficiency of the cycle? In a paragraph of no less than 125 words, explain the three aspects involved in gaining a true appreciation for music. Explain why cytotoxic T cells are not affective against bacteria. An adult eats food whose nutritional energy totalsapproximately2.2*103 Cal per day. The adultburns2.0*103 Cal per day. How much excessnutritionalenergy, in kilojoules, does the adult consume per day?If 1lb of fat is stored by the body for each14.6*103kilojoules of excess nutritional energyconsumed, how long will ittake this person to gain 1 lb. What are the tiny functioning units found within the cytoplasm called? A. Organisms B. Organ systems C. Organelles D. Organs Vector C has a magnitude of 22.2 m and points in the y direction. Vectors A and B both have positive y components, and make angles of =41.9 and =28.2 with the positive and negative x- axis, respectively. If the vector sum A+B+C=0 , what are the magnitudes of A and B? An electron with speed 2.45 x 10^7 m/s is traveling parallel to a uniform electric field of magnitude 1.18 x 10^4N/C . How much time will elapse before it returns to its starting point? One of the diversity challenges managers have to deal with is that, in addition to differences in the employee groups that make up their staff, people are much more mobile in today's world. If an American manager, James, were to accept an assignment in Latin America, for example, he would need to be particularly aware of the _____________ of the workforce. How do post depositional changes convert sediments tosedimentary rocks ? A boy is pulling a load of 150N with a string inclined at an angle 30 to the horizontal if the tension of string is 105N the force tending to lift the load off the ground is In a study of stress levels in U.S. army recruits stationed in Iraq, researchers obtained a complete list of the names of recruits in Iraq at the time of the study. They listed the recruits alphabetically and then numbered them consecutively. One hundred random numbers between one and the total number of recruits were then generated using a random-number generator on a computer. The 100 recruits whose numbers corresponded to those generated by the computer were interviewed for the study. What is the population of interest in this study? A bullet in a gun is accelerated from the firing chamber to the end of the barrel at an average rate of 5.80 105 m/s2 for 9.60 104 s. What is its muzzle velocity (in m/s) (that is, its final velocity)? (Enter the magnitude.) During the Cold War, defense contractors were required to shield sensitive computing systems and prevent electronic eavesdropping of any computer emissions. The U.S. Department of Defense calls this special computer-emission shielding ____ A solution of HNO3 is standardized by reaction with pure sodium carbonate. 2H++Na2CO32Na++H2O+CO2 A volume of 23.450.05 mL of HNO3 solution was required for complete reaction with 0.96160.0009 g of Na2CO3 , (FM 105.9880.001 g/mol ). Find the molarity of the HNO3 solution and its absolute uncertainty. Note: Significant figures are graded for this problem. To avoid rounding errors, do not round your answers until the very end of your calculations. There are 20 tiles in a bag. Of these, 9 are purple, 5 are black and the rest are white.Event A = drawing a white tile on the first drawEvent B = drawing a black tile on the second drawIf two tiles are drawn from the bag one after the other and not replaced, what is P(B|A) expressed in simplest form? Are the rational numbers closed under multiplication? The graph of a Function F is shown below. find F (0).