Create a console application project and solution called “ConsoleWorkWithData.” using C#
Create the following variables with data type:
a. FirstName: string data type
b. LastName: string data type
c. Student ID: int data type
d. BirthDate: data time data type
e. Grade: decimal data type
Write all values in these variables to the screen in this format:
a. ---------------------------------------------------------
b. My name is Rieser Angie
c. I’m a new student, and this is my first program
d. **************************************
e. My student id is: ARIESE2654
f. My birthdate is: 05-10-1998
g. My Grade is: 90.94
h. ______________________________________
using System.IO;
using System;
class Program
{
static void Main()
{
Console.Write("Enter First Name: ");
string firstName = Console.ReadLine();
Console.Write("Enter Last Name: ");
string lastName = Console.ReadLine();
Console.Write("Enter Student ID: ");
int studentId= Convert.ToInt32(Console.ReadLine());
Console.Write("Enter Birth Date: ");
DateTime birthDate = DateTime.Parse(Console.ReadLine());
Console.Write("Enter Grade: ");
decimal grade = decimal.Parse(Console.ReadLine());
Console.WriteLine();
Console.WriteLine("---------------------------------------------------------");
Console.WriteLine("My name is "+firstName+" "+lastName);
Console.WriteLine("I’m a new student, and this is my first
program");
Console.WriteLine("**************************************");
Console.WriteLine("My student id is: ARIESE"+studentId);
Console.WriteLine("My birthdate is:
"+birthDate.ToString("dd-MM-yyyy"));
Console.WriteLine("My Grade is: "+grade);
Console.WriteLine("---------------------------------------------------------");
}
}
Output:
$mcs *.cs -out:main.exe $mono main.exe Enter First Name: Enter Last Name: Enter Student ID: Enter Birth Date: Enter Grade: --------------------------------------------------------- My name is Rieser Angie I’m a new student, and this is my first program ************************************** My student id is: ARIESE2654 My birthdate is: 10-05-1998 My Grade is: 90.94 ---------------------------------------------------------
Create a console application project and solution called “ConsoleWorkWithData.” using C# Create the following variables with...
Here is the code from the previous three steps:
#include <iostream>
using namespace std;
class Student
{
private:
//class variables
int ID;
string firstName,lastName;
public:
Student(int ID,string firstName,string lastName)
//constructor
{
this->ID=ID;
this->firstName=firstName;
this->lastName=lastName;
}
int getID() //getter method
{
return ID;
}
virtual string getType() = 0; //pure virtual function
virtual void printInfo() //virtual function to print basic details
of a student
{
cout << "Student type: " << getType() <<
endl;
cout << "Student ID: " << ID...
Create a Java program for a school. Create a report containing information for a classroom. For each classroom, the report will contain: the room number, the teacher and subject to the class, and a list of students assigned to the class and their grade. Create a directory called “SchoolInfo". Create Displayable interface. The interface should declare one method Create Person (abstract) class String firstName String lastName. (other classes will implement this one) Create the Teacher class, name and subject Create...
I need a code summary for these problems Sale Total Create a Visual C# Windows Console Application that will prompt the user to enter what type of item they are purchasing, the quantity of the item, and the price for the item. Calculate the subtotal, the sales tax and the sales total (subtotal + sales tax) and output all 3 to the user. Assume that the sales tax for your application is 8.5% (create a constant to store this value...
Using Python: Par 1. You will define Student class with the following attributes: CWID: the student’s CWID FirstName: the student’s first name LastName: the student’s last name Gender: the student’s gender (‘M’ or ‘F’) BirthDate: the student’s date of birth (e.g. ‘03/14/1999’) ClassID: the class id that the student took ClassDate: the date when the student took the class (e.g. ‘01/26/2018’) Grade: the student’s grade for the class In addition, you will do the following tasks: Implement a set of...
Create a C# console application that performs the following: 1) Build a method which reads 3 integers from the console and returns them as an int array (type a number, then hit enter, 3 times). This needs to be its own method. 2) Call this method twice to store 2 local int array variables. 3) Once both arrays are built, write another method which accepts the two arrays and compares the contents to see if they match. If the method...
Create a C# console application that performs the following: 1) Build a method which reads 3 integers from the console and returns them as an int array (type a number, then hit enter, 3 times). This needs to be its own method. 2) Call this method twice to store 2 local int array variables. 3) Once both arrays are built, write another method which accepts the two arrays and compares the contents to see if they match. If the method...
In c programming
.
Part A: Writing into a Sequential File Write a C program called "Lab5A.c" to prompt the user and store 5 student records into a file called "stdInfo.txt". This "stdInfo.txt" file will also be used in the second part of this laboratory exercise The format of the file would look like this sample (excluding the first line) ID FIRSTNAME LASTNAME GPA YEAR 10 jack drell 64.5 2018 20 mina alam 92.3 2016 40 abed alie 54.0 2017...
answer in c# console application.
File l/O Create a Person class (firstName, lastName, phoneNumber, gender (Use radioButtons for gender in the GUI) ) Create a List<Person> Create a GUI that will collect the Person information from the user and have 3 buttons: Add, Display, Read. Add button Add the just created person to List<Person>, and append to a text file Display button > print out all persons currently in the List<Person> in a label in a visually attractive way Read...
C++ program Create a Student class that contains three private data members of stududentID (int), lastName (string), firstName(string) and a static data member studentCount(int). Create a constructor that will take three parameters of studentID, lastName and firstName, and assign them to the private data member. Then, increase the studentCount in the constructor. Create a static function getStudentCount() that returns the value of studentCount. studentCount is used to track the number of student object has been instantiated. Initialize it to 0...
Challenge: C# Basics Description: Write a C# console application using .NET Core that utilizes constants, variables, data types, operators, expressions, statements, blocks, and control flow. Purpose: This application provides experience in working with basic language features of C#. It is important when working with a new language to understand how it handles its constants, variables, data types, operators, expressions, statements, blocks, and control flow. A good thing to always do with a new language is to build test applications where...