Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Complete the missing c# code in the bellow program required to obtain the following expected result: Welcome to c# workshops & training Registration cost varies

Complete the missing c# code in the bellow program required to obtain the following expected result:
Welcome to c# workshops & training
Registration cost varies according to the number of days as follows:
The cost for 5 days is $200
The cost for 10 days is $500
The cost for 15 days is $1000
Note: You have to comply with the instructions given as comments in the program
using System;
class Program {
public class workshop {
int nbOfdays;
decimal fees;
public workshop(int ndays, decimal fe) { nbOfdays = ndays; fees = fe; }
public override string ToString() {
// use interpolated string
____________________________________________________________
}
public static void Main(String[] args) {
String str1 = "Welcome to", str2 = "c# workshop & training", str3 = "Registration cost";
workshop[] workshops = { new workshop(5, 200), new workshop(10, 500), new workshop(15,1000) };
// printing using formatting string and the defined string variables
__________________________________________________________________
// printing using interpolated string and the defined string variables
_____________________________________________________________
// printing all workshops using foreach
_______________________________________________________________
Console.ReadKey();
}
}

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_2

Step: 3

blur-text-image_3

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

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students explore these related Databases questions