Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: This assignment is designed to learn programming in VB.NET. Questions: (2 marks) In Visual Studio, create a VB.NET Console Application that does the following:

Objective:

This assignment is designed to learn programming in VB.NET.

Questions:

(2 marks) In Visual Studio, create a VB.NET Console Application that does the following:

Create three variables of String data type, called firstName, lastName, and fullName respectively;

Assign your first name to the variable firstName;

Assign your last name to the variable lastName;

Concatenate the variable firstName, a string containing a space (i.e., ), the variable lastName together, and then assign the result to the variable fullName;

Display your name in the console window using the statement Console.WriteLine(fullName)

(3 marks) In Visual Studio, create a VB.NET Console Application that does the following:

Create a variable of Integer data type, called marks;

Create a variable of String data type, called grade;

Assign 88 to marks;

Convert marks into grade as follows using the Select-Case statement:

marks

grade

90-100

A+

85-89

A

80-84

A-

77-79

B+

73-76

B

70-72

B-

67-69

C+

63-66

C

60-62

C-

50-59

D

0-49

F

(5) Display the values of marks and grade in the console window using the statements

Console.WriteLine(marks)

Console.WriteLine(grade)

(2 marks) Repeat Question 2 using the If-Then-ElseIf statement (instead of the Select-Case statement). Your output should be exactly the same as that of Question 2.

(3 marks) In Visual Studio, create a VB.NET Console Application that uses the While loop to display all leap years between 2017 and 2050. A leap year between 2017 and 2050 is a year that is an integer multiple of 4 (i.e., year Mod 4 = 0). For example, 2020 and 2040 are leap years. (Hint: you need both the While and If-Then statements.)

For each question, print the program and handwrite the output at the end of the printout of the program.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago