Question

Coding for MindTap C# Programming Exercise 7-1.

Create a program named SalesLetter whose Main() method uses several WriteLine() calls to display a sales letter to prospective clients for a business of your choice. Display your contact information at least three times in the letter. The contact information should contain at least three lines with data such as land line phone number, cellphone number, email address, and so on. Each time you want to display the contact information, call a method namedDisplayContactInfo().

Note that the DisplayContactInfo method must be defined as public static void DisplayContactInfo in order for the tests to have access to it.

A X Programming Exercise 7-1 Tasks SalesLetter.cs >_ Terminal + Program contains required code 5.00 out of 10.00 1 using Syst

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Screenshot of the Code:

using System; using System.Collections . Generic; using System. Linq; using System. Text. RegularExpressions ; namespace MySa

Sample Output:

My Sales letter Details DisplayContactInfo() method called: Cellphone Number: 9876443210 Landline Number: 0123776789 Email ID

Code to Copy:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
namespace MySalesLetter

{

public class SalesLetter
{
//Define the variables.
static string cellphone = "9876443210";
static string landline = "0123776789";
static string email = "[email protected]";
public static void DisplayContactInfo()
{
//Display the details in 3 lines. In the format
//detail header followed by space followed by value.
Console.WriteLine("Cellphone Number: {0}\nLandline Number: {1}\nEmail ID :{2}",
cellphone, landline, email);

}
public static void Main(string[] args)
{   
//Display the message and call the method.
Console.WriteLine("My Sales letter Details");
Console.WriteLine("DisplayContactInfo() method called:");
DisplayContactInfo();
Console.WriteLine("DisplayContactInfo() method called:");
DisplayContactInfo();
Console.WriteLine("DisplayContactInfo() method called:");
DisplayContactInfo();
}
}
}

Add a comment
Know the answer?
Add Answer to:
Coding for MindTap C# Programming Exercise 7-1. Create a program named SalesLetter whose Main() method uses...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Help In C# CHECKS: Program outputs score before and after bonus Method GiveBonus is overloaded Output:...

    Help In C# CHECKS: Program outputs score before and after bonus Method GiveBonus is overloaded Output: It has to look exactly like that Output Scores was 82.Now it is 5. Grade was B Now it is + --------------------------------------------------------------------- DebugEight2.cs has syntax and/or logical errors. Determine the problem(s), and fix the program. CODE: // Overloaded method gives bonus points // whether grade is a number or letter using static System.Console; class DebugEight2 { static void Main() { int numericScore = 82;...

  • Create a DataEntryException class whose getMessage() method returns information about invalid integer data. Write a program...

    Create a DataEntryException class whose getMessage() method returns information about invalid integer data. Write a program named GetIDAndAge that continually prompts the user for an ID number and an age until a terminal 0 is entered for both. If the ID and age are both valid, display the message ID and Age OK. Throw a DataEntryException if the ID is not in the range of valid ID numbers (0 through 999), or if the age is not in the range...

  • Create a program named IntegerFacts whose Main() method declares an array of 10 integers. Call a...

    Create a program named IntegerFacts whose Main() method declares an array of 10 integers. Call a method named FillArray to interactively fill the array with any number of values up to 10 or until a sentinel value (999) is entered. If an entry is not an integer, reprompt the user. Call a second method named Statistics that accepts out parameters for the highest value in the array, lowest value in the array, sum of the values in the array, and...

  • public class EmployeeDriver public static void main(String[] args) 1/declare create an Employee object named joo. Une...

    public class EmployeeDriver public static void main(String[] args) 1/declare create an Employee object named joo. Une no-arg constructor 1/change the attributes for joe as the following: //name to Joe Cool, id to 1111111, hours to 20, pay rate to 15 //dealare & create another Employee oblegt named one using arg-constructor // The name of the new employees Jane Doeid is 2001122. She makes $10.50/hour // change the object Jane's hours to 40. 1/change the object jane's pay rate to $12.00....

  • Using C# Create an application class named LetterDemo that instantiates objects of two classes named Letter...

    Using C# Create an application class named LetterDemo that instantiates objects of two classes named Letter and CertifiedLetter and that demonstrates all their methods. The classes are used by a company to keep track of letters they mail to clients. The Letter class includes auto-implemented properties for the Name of the recipient and the Date mailed (stored as strings). Next, include a ToString() method that overrides the Object class’s ToString() method and returns a string that contains the name of...

  • This Exercise contains two classes: ValidateTest and Validate. The Validate class uses try-catch and Regex expressions...

    This Exercise contains two classes: ValidateTest and Validate. The Validate class uses try-catch and Regex expressions in methods to test data passed to it from the ValidateTest program. Please watch the related videos listed in Canvas and finish creating the 3 remaining methods in the class. The regular expression you will need for a Phone number is: "^\\(?(\\d{3})\\)?[- ]?(\\d{3})[- ]?(\\d{4})$" and for an SSN: "^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$" This exercise is meant to be done with the video listed in the...

  • Java Project In Brief... For this Java project, you will create a Java program for a...

    Java Project In Brief... For this Java project, you will create a Java program for a school. The purpose is to create a report containing one or more classrooms. For each classroom, the report will contain: I need a code that works, runs and the packages are working as well The room number of the classroom. The teacher and the subject assigned to the classroom. A list of students assigned to the classroom including their student id and final grade....

  • Assignment Overview In Part 1 of this assignment, you will write a main program and several...

    Assignment Overview In Part 1 of this assignment, you will write a main program and several classes to create and print a small database of baseball player data. The assignment has been split into two parts to encourage you to code your program in an incremental fashion, a technique that will be increasingly important as the semester goes on. Purpose This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of...

  • Please complete the following programming with clear explanations. Thanks! Homework 1 – Programming with Java: What...

    Please complete the following programming with clear explanations. Thanks! Homework 1 – Programming with Java: What This Assignment Is About? Classes (methods and attributes) • Objects Arrays of Primitive Values Arrays of Objects Recursion for and if Statements Selection Sort    Use the following Guidelines: Give identifiers semantic meaning and make them easy to read (examples numStudents, grossPay, etc.) Use upper case for constants. • Use title case (first letter is upper case) for classes. Use lower case with uppercase...

  • Activity: Writing Classes Page 1 of 10 Terminology attribute / state behavior class method header class...

    Activity: Writing Classes Page 1 of 10 Terminology attribute / state behavior class method header class header instance variable UML class diagram encapsulation client visibility (or access) modifier accessor method mutator method calling method method declaration method invocation return statement parameters constructor Goals By the end of this activity you should be able to do the following: > Create a class with methods that accept parameters and return a value Understand the constructor and the toString method of a class...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT