Questions: 1 835

Answers by our Experts: 1 539

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a user defined method named getMark that can be used to get a valid mark from the user. Your method must continuously ask the user for a mark, until a valid mark is entered (valid marks are between 0 and 100). If a user enters an invalid mark, display an error message before asking for a valid mark to be entered. The method must return the valid value to the calling program.

Write a user defined method named isPass that can be used to determine whether a mark is a pass mark (greater or equal to 50). The method must take as input a mark, and return a boolean, indicating whether the mark was a pass mark.

Write a program that reads in 5 marks by using the getMark method to ensure that valid marks are processed. You need to calculate the sum and the average of the marks. Your program must also use the isPass method to determine the number of pass marks entered. When the 5 marks have been processed you need to display the sum, average and number of passes (from these marks).



 1. [15 marks] Write a new method that will work as the menu of your application. Details: 

  • Name: YourNameMenu – replace “YourName” with your first name. For example: 
  • Parameter: None 
  • Returns: A string representing the choice the user have done for the menu option 
  • Displays: The menu below - It should MATCH EXACTLY the output you see below 
  • Task: Prints out the menu below, collects the user input and returns the input as the method’s return value. 

2. [25 marks] In your Main method, using a “while” loop, not a “do while”, write the code to call the Menu method you have created on question #1 repeatedly. 

Using a “switch” structure, write the code to implement the following required functionality for all valid responses. Valid responses includes both upper and lower case of the input. The following must be implemented: 

- A will call the DemoQuestion3() method 

- B will call the DemoQuestion4() method 

- C will call the DemoQuestion5() method 

- X will terminate the program 

Any other 


The number of lines that can be printed on a paper depends on the paper size, the point size of each character in a line, whether lines are double-spaced or single-spaced, the top and bottom margin, and the left and right margins of the paper. Assume that all characters are of the same point size and all lines are either single-spaced or double spaced. Note that 1 inch = 72 points. Moreover, assume that the lines are printed along with the width of the paper. For example, if the length of the paper is 11 inches and width is 8.5 inches, then the maximum length of a line is 8.5 inches. Write a c# .net program that calculates the number of characters in a line and the number of lines that can be printed on a paper based on the following input from the user:

a. The length and width, in inches of the paper

b. The top, bottom, left, and right margins

c. The point size of a line

d. If the lines are double-spaced, then double the point size of each character

Provide a proper GUI for the user.



The first line will contain a message prompt to input the size of the matrix.


The succeeding lines will prompt for the elements of the matrix.


The last line will contain the word "MAGIC!" if it is a magic square and "Just a square" if it isn't.

The first line will contain a message prompt to input the number of elements.



The second line will contain message prompts for the elements of the array.



The succeeding lines will contain the arranged elements of the array. Make sure to print the numbers in the order in which they appear in the input. In this case, since 6 appeared first before 12, 6 is printed first.

1- Write a program to demonstrate static variables, methods, and blocks.

2- Write a program in C# Sharp to create a user define function.

3- Write a program in C# Sharp to create a user define function with parameters.

4- Write a program in C# Sharp to create a function to display the n number Fibonacci

sequence.

5- Write a program in C# Sharp to create a function to calculate the sum of the

individual digits of a given number. 

Enter a number: 1234

Expected Output:

The sum of the digits of the number 1234 is: 10


6- Write a program to calculate the roots of Quadratic equations using encapsulation.

7- Write a program for calculating Matrix Operations.

1. Addition.

2. Multiplication.


1- Write a program to demonstrate static variables, methods, and blocks.

2- Write a program in C# Sharp to create a user define function.

3- Write a program in C# Sharp to create a user define function with parameters.

4- Write a program in C# Sharp to create a function to display the n number Fibonacci sequence.

5- Write a program in C# Sharp to create a function to calculate the sum of the individual digits of a given number. Enter a number: 1234 Expected Output: The sum of the digits of the number 1234 is: 10.

6- Write a program to calculate the roots of Quadratic equations using encapsulation.

7- Write a program for calculating Matrix Operations. 1. Addition. 2. Multiplication


1 Write a program to demonstrate static variables, methods, and blocks.

2 Write a program in C# Sharp to create a user define function.

3 Write a program in C# Sharp to create a user define function with parameters.

4 Write a program in C# Sharp to create a function to display the n number Fibonacci

sequence.

5 Write a program in C# Sharp to create a function to calculate the sum of the

individual digits of a given number. 

Enter a number: 1234

Expected Output:

The sum of the digits of the number 1234 is: 10


6 Write a program to calculate the roots of Quadratic equations using encapsulation.

7 Write a program for calculating Matrix Operations.

1. Addition.

2. Multiplication.


Write a C# console app that will input a text file of numbers. For these numbers, find the number of numbers (one per line), the largest of these numbers, the smallest of these number, and the average of these numbers. 

Also determine the number of numbers in the range 00000 - 09999, 10000 - 199999, 20000 - 29999, etc. all the way through 90000 - 99999.


Create a program that asks the user to input 5 numbers. The numbers should be stored in a list, after which, your program should determine the lowest number on the list using a loop then it will display the lowest number. Comment your code below. Sample Output: Enter 5 numbers: 6 3 2 1 4 Lowest Number is 1

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS