- Create the pseudo-code/flowchart for an application class named Monogram. Its main() method inputs three variables that hold your first, middle, and last initials, respectively. Create a method(called Monogram()) to which you pass the three initials and that displays the initials twiceonce in the order of first, middle, and last, and a second time in traditional monogram style (first, last, middle). Main inputs the data, you pass it to the Monogram Function, which will output the data.
- Design an application that will convert either Fahrenheit to Celsius or Celsius to Fahrenheit. Have the user enter a 1 to convert Fahrenheit to Celsius and a 2 for Celsius to Fahrenheit. If the user enters any other number, output an error message. Once the user enters a 1, call a Method(called FtoC()) that does the input, calculation and output for a Fahrenheit to Celsius conversion. If the user enters a 2, call a Method(called CtoF()) that does the input, calculation and output for a Celsius to Fahrenheit conversion. Also write the pseudo-code.
- Design an application that will Calculate the area of a Shape. Have the user enter a C to use a Circle, an S to use a Square and an R to use a Rectangle. If the user enters any other letter or number, output an error message. Once the user enters a C, call a Method(called Circle()) that does the input, calculation and output to Calculate the area of a Circle. If the user enters an S, call a Method(called Square()) that does the input, calculation and output to Calculate the area of a Square. If the user enters an R, call a Method(called Rectangle()) that does the input, calculation and output to Calculate the area of a Rectangle. Also write the pseudo-code.
- Create the pseudo-code/flowchart for an application that contains a main() method that continuously prompts the user for a number of dollars until the user enters 0. The main method passes the amount to a conversion method that displays the breakdown of the passed amount into the fewest bills; in other words, it calculates the number of 20s, 10s, 5s, and 1s needed.
Hint #1: In Visual Logic you do an integer divide using the symbol . So if you wanted to divide 5 by 3 and not get a fractional result then you would say 5 3 which will give you a result of 1.
Hint #2: In Visual Logic you can find the remainder of an integer division by using the MOD operator. So to get the remainder of 5 3 you would write 5 MOD 3 which would result in 2.
Reviews
There are no reviews yet.