Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

a. Write a C# program named ProjectedSales that includes a named constant repres

ID: 3661784 • Letter: A

Question

a. Write a C# program named ProjectedSales that includes a named constant representing next year’s anticipated 10 percent increase in sales for each division of a company. (You can represent 10 percent as 0.10). Also declare variables to represent this year’s sales totals in dollars for the North and South divisions. Assign appropriate values to the variables—for example, 4000 and 5500. Compute and display, with explanatory text, next year’s projected sales for each division.

b. Convert the ProjectedSales class to an interactive application named ProjectedSalesInteractive. Instead of assigning values to the North and South sales variables, accept them from the user as input.

Explanation / Answer

a.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProjectedSales
{
class Program
{
static void Main(string[] args)
{
const double incre = 10;
double yearsale_nor = 4000, yearsale_sou=5500, next_nor, next_sou;
next_nor = yearsale_nor + (yearsale_nor * incre / 100);
next_sou = yearsale_sou + (yearsale_sou * incre / 100);

Console.WriteLine("Next Year Projected sale from North Region = " + next_nor);
Console.WriteLine("Next Year Projected sale from South Region = " + next_sou);
Console.ReadKey();
}
}
}

b.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProjectedSalesInteractive
{
class Program
{
static void Main(string[] args)
{
const double incre = 10;
double yearsale_nor, yearsale_sou, next_nor, next_sou;

Console.WriteLine("Enter Sale for North and South Region");
yearsale_nor = Convert.ToInt32(Console.ReadLine());
yearsale_sou = Convert.ToInt32(Console.ReadLine());
next_nor = yearsale_nor + (yearsale_nor * incre / 100);
next_sou = yearsale_sou + (yearsale_sou * incre / 100);

Console.WriteLine("Next Year Projected sale from North Region = " + next_nor);
Console.WriteLine("Next Year Projected sale from South Region = " + next_sou);
Console.ReadKey();
}
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote