Category: Learn To Code

Create a PrintStream object using dos and assign the resulting reference to ps, a PrintStream variable that has already been declared.

Create a PrintStream object using dos and assign the resulting reference to ps, a PrintStream variable that has already been declared.

LANGUAGE:  JAVA CHALLENGE: One of the constructors for PrintStream class has a single OutputStream argument. Assume that dos is a variable that references an OutputStream object. Create a PrintStream object using dos and assign the resulting reference to ps, a PrintStream variable that has already been declared....

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Suppose a reference variable of type String called myString has already been declared. Create an object of type String and assign it to the reference variable myString.

Suppose a reference variable of type String called myString has already been declared.  Create an object of type String and assign it to the reference variable myString.

LANGUAGE:  JAVA CHALLENGE: Suppose a reference variable of type String called myString has already been declared. Create an object of type String and assign it to the reference variable myString....

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Create an object of type Double with the initial value of x and assign it to the reference variable myDouble.

Create an object of type Double with the initial value of x and assign it to the reference variable myDouble.

LANGUAGE:  JAVA CHALLENGE: Suppose a reference variable of type Double called myDouble has already been declared. There is also a double variable x that has been declared and initialized. Create an object of type Double with the initial value of x and assign it to the reference variable myDouble....

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Write an expression that results in a String consisting of the third through tenth characters of the String s.

Write an expression that results in a String consisting of the third through tenth characters of the String s.

LANGUAGE:  JAVA CHALLENGE: Write an expression that results in a String consisting of the third through tenth characters of the String s....

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Assume that name is a variable of type String that has been assigned a value. Write an expression whose value is a String containing the last character of the value of name. So if the value of name were “Smith” the expression’s value would be “h”.

Assume that name is a variable of type String that has been assigned a value.  Write an expression whose value is a String containing the last character of the value of name.  So if the value of name were “Smith” the expression’s value would be “h”.

LANGUAGE:  JAVA CHALLENGE: Assume that name is a variable of type String that has been assigned a value. Write an expression whose value is a String containing the last character of the value of name. So if the value of name were “Smith” the expression’s value would be “h”....

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Assume that name has been declared suitably for storing names (like “Amy”, “Fritz” and “Moustafa”)

Assume that name has been declared suitably for storing names (like “Amy”, “Fritz” and “Moustafa”)

LANGUAGE:  JAVA CHALLENGE: Assume that name has been declared suitably for storing names (like “Amy”, “Fritz” and “Moustafa”). Assume also that stdin is a variable that references a Scanner object associated with standard input. Write some code that reads a value into name then prints the message “Greetings, NAMEVALUE!!!” on a line by itself where...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Suppose a reference variable of type File called myFile has already been declared. Create an object of type File with the initial file name input.dat and assign it to the reference variable myFile.

Suppose a reference variable of type File called myFile has already been declared. Create an object of type File with the initial file name input.dat and assign it to the reference variable myFile.

LANGUAGE:  JAVA CHALLENGE: Suppose a reference variable of type File called myFile has already been declared. Create an object of type File with the initial file name input.dat and assign it to the reference variable myFile....

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Given an integer variable i and a floating-point variable f, that have already been given values, write a statement that writes both of their values to standard output in the following format

Given an integer variable i and a floating-point variable f, that have already been given values, write a statement that writes both of their values to standard output in the following format

LANGUAGE:  JAVA CHALLENGE: The exercise instructions here are LONG — please read them all carefully. If you see an internal scrollbar to the right of these instructions, be sure to scroll down to read everything. Given an integer variable i and a floating-point variable f, that have already been given values, write a statement that...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Write a program that takes the account’s present value, monthly interest rate, and the number of months that the money will be left in the account as three inputs from the user.

Write a program that takes the account’s present value, monthly interest rate, and the number of months that the money will be left in the account as three inputs from the user.

LANGUAGE:  PYTHON CHALLENGE: Suppose you have a certain amount of money in a savings account that earns compound monthly interest, and you want to calculate the amount that you will have after a specific number of months. The formula is as follows: f = p * (1 + i)^t • f is the future value...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Write a Boolean function named is_prime which takes an integer as an argument and returns true if the argument is a prime number, or false otherwise. Use the function in a program that prompts the user to enter a number and then prints whether the number is prime.

Write a Boolean function named is_prime which takes an integer as an argument and returns true if the argument is a prime number, or false otherwise. Use the function in a program that prompts the user to enter a number and then prints whether the number is prime.

LANGUAGE:  PYTHON CHALLENGE: A prime number is a number that is only evenly divisble by itself and 1. For example, the number 5 is prime because it can only be evenlly divided by 1 and 5. The number 6, however, is not prime because it can be divided evenly by 2 and 3. Write a...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More