Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hello, the ending is not working for me . Can please help me . using System; using static System.Console; using System.Globalization; class SalesTransaction { private
Hello, the ending is not working for me
Can please help me
using System;
using static System.Console;
using System.Globalization;
class SalesTransaction
private string name;
private double salesAmount;
private double commission;
private static readonly double RATE ;
public SalesTransactionstring name, double salesAmount, double rate
this.name name;
this.salesAmount salesAmount;
this.commission salesAmount rate;
public SalesTransactionstring name, double salesAmount
this.name name;
this.salesAmount salesAmount;
this.commission ;
public SalesTransactionstring name
this.name name;
this.salesAmount ;
this.commission ;
public static double GetRate
return RATE;
public static SalesTransaction operator SalesTransaction transaction SalesTransaction transaction
string combinedName $transactionname and transactionname;
double combinedSalesAmount transactionsalesAmount transactionsalesAmount;
double combinedCommission combinedSalesAmount RATE;
return new SalesTransactioncombinedName combinedSalesAmount, RATE;
public void Display
WriteLineSalesperson: name;
WriteLineSales Amount: salesAmount.ToStringC CultureInfo.GetCultureInfoenUS;
WriteLineCommission: commission.ToStringC CultureInfo.GetCultureInfoenUS;
WriteLineCommission Rate: RATE.ToStringP CultureInfo.InvariantCulture; Display rate as percentage
WriteLine;
class SalesTransactionDemo
static void Main
SalesTransaction transaction new SalesTransactionJohn Doe", ;
SalesTransaction transaction new SalesTransactionJane Smith", ;
SalesTransaction combinedTransaction transaction transaction;
Displaytransaction;
Displaytransaction;
DisplaycombinedTransaction;
DisplayTotaltransaction transaction combinedTransaction;
public static void DisplaySalesTransaction transaction
WriteLineIndividual Transaction:";
transaction.Display;
public static void DisplayTotalparams SalesTransaction transactions
WriteLineTotal Sales Amount: transactions.Sumt tGetSalesAmountToStringC CultureInfo.GetCultureInfoenUS;
WriteLineTotal Commission: transactions.Sumt tGetCommissionToStringC CultureInfo.GetCultureInfoenUS;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started