Question

In: Computer Science

Complete this programming problem in this assignment by using Microsoft Visual Studio Suite. Compile your solutions...

Complete this programming problem in this assignment by using Microsoft Visual Studio Suite. Compile your solutions for each problem solved in a Word or Google document which includes (a) the pseudocode, (b) the C# codes and (c) the execution result (screen capture just the answer part using Snipping Tool, avoiding non-related or blank spaces). Notice for readability, that the (a) & (b) are in text mode and the (c) is in image mode. Use proper titles and wording in the results, such as Console.WriteLine("The total change to be made is {0:C}.", change); so that the results could be easily understood by a third party reader.

Question: Write a C# program to compute the profit made for selling goldfish flakes online. The wholesale cost for a case of 24-boxes is $118. The price for sale with shipping charge is $9.59 per box. Shipping cost is $1.35 per box. The onlinelisting charge is 12% of the customer payment. The payment processing cost is 4% of the payment. Compute and display the following figures for selling 25 cases of the products: the total wholesale cost for 25 cases; the total revenue for 25 cases of 24 boxes per case, the total listing cost, the total payment processing cost, and the total profit made.

Solutions

Expert Solution

(a)Pseudo Code:

      

Function problem(input: customerpayment)

Var wholesalecost=25*118;

Var revenue=   customerpayment+(9.59+1.35)*(118/24)*25;

Var llistcost=0.12*customerpayment;

Var paymentcost=0.04*customerpayment;

Var sprice= revenue-(listcost+paymentcost);

If sprice>wholesalecost :profit (sprice-wholesalecost)

Else if sprice<wholesalecost: loss(wholesalecost-sprice)

Else print(‘No loss or Gain’)

(b)C# Code:

using System;

public class Problem

{

public static void Main()

{

double wholesalecost, revenue, listcost, paymentcost, customerpayment,sprice,plamt;

wholesalecost= 25 * 118;

Console.Write("\n\nWholesalecost : {0}\n\n", wholesalecost);

Console.Write("Input Customer Payment: ");

customerpayment= Convert.ToDouble(Console.ReadLine());

revenue= customerpayment+(9.59+1.35)*(118/24)*25;

Console.Write("\n\nTotalRevenue : {0}\n\n", revenue);

listcost=0.12*customerpayment;

Console.Write("\n\nTotalListingCost : {0}\n\n", listcost);

paymentcost=0.04*customerpayment;

Console.Write("\n\nTotalPaymentProcessingCost : {0}\n\n", paymentcost);

sprice=revenue-(listcost+paymentcost);

   if(sprice>wholesalecost)

   {

        plamt = sprice-wholesalecost;

        Console.Write("\nYour profit amount : {0}\n", plamt);

   }

   else if(wholesalecost>sprice)

   {

        plamt = wholesalecost-sprice;

        Console.Write("\nYour loss amount : {0}\n", plamt);

    }

   else  

    {

        Console.Write("\nYou are running in no profit no loss condition.\n");

    }

}

}

     

  


Related Solutions

Complete the 3 programming problems in this assignment by using Microsoft Visual Studio Suite. Compile your...
Complete the 3 programming problems in this assignment by using Microsoft Visual Studio Suite. Compile your solutions for each problem solved in a Word or Google document which includes (a) the pseudocode, (b) the C# codes and (c) the execution result (screen capture just the answer part using Snipping Tool, avoiding non-related or blank spaces). Notice for readability, that the (a) & (b) are in text mode and the (c) is in image mode. Use proper titles and wording in...
Complete the 3 programming problems in this assignment by using Microsoft Visual Studio Suite. Compile your...
Complete the 3 programming problems in this assignment by using Microsoft Visual Studio Suite. Compile your solutions for each problem solved in a Word or Google document which includes (a) the pseudocode, (b) the C# codes and (c) the execution result (screen capture just the answer part using Snipping Tool, avoiding non-related or blank spaces). Notice for readability, that the (a) & (b) are in text mode and the (c) is in image mode. Use proper titles and wording in...
C# Programming language!!! Using visual studios if possible!! PrimeHealth Suite You will create an application that...
C# Programming language!!! Using visual studios if possible!! PrimeHealth Suite You will create an application that serves as a healthcare billing management system. This application is a multiform project (Chapter 9) with three buttons. The "All Accounts" button allows the user to see all the account information for each patient which is stored in an array of class type objects (Chapter 9, section 9.4).The "Charge Service" button calls the Debit method which charges the selected service to the patient's account...
Answer the questions below as indicated. Note that you have to complete these using Visual Studio...
Answer the questions below as indicated. Note that you have to complete these using Visual Studio 2019. Upload the source code (.cpp) of your applications. Upload a separate (.cpp) file for each question. 1-Create a C++ program which adds two numbers and displays the sum. 2-Create a C++ program which calculates and displays the area of a rectangle. 3-Create a C++ program which calculates and displays the average of four numbers.. 4-Complete questions 3 of the chapter 3 Programming Exercises...
MUST BE WRITTEN IN ASSEMBLY LANGUAGE ONLY AND MUST COMPILE IN VISUAL STUDIO You will write...
MUST BE WRITTEN IN ASSEMBLY LANGUAGE ONLY AND MUST COMPILE IN VISUAL STUDIO You will write a simple assembly language program that performs a few arithmetic operations. This will require you to establish your programming environment and create the capability to assemble and execute the assembly programs that are part of this course. Your \student ID number is a 7-digit number. Begin by splitting your student ID into two different values. Assign the three most significant digits to a variable...
How to compile this code on Visual Studio? Because it keeps getting me an error when...
How to compile this code on Visual Studio? Because it keeps getting me an error when i compile it. #include<iostream.h> #include<cio.h> class Array { public: Array(int=0)//initalise the array with 0 value Array(const Array &); ~Array(); private: int size; int *arr; bool setvalue(int index,int value); bool getvalue(int index,int &value); Array & increment(); int getsize(); void print(); Array &Add(const Array arr); bool Equal(const Array *arr)const; Array &removeAt(int index); Array &insertAt(int index,int value); }; //End of Array class void Array::setvalue(int index,int value) //set...
This programming assignment will consist of a C++ program. Your program must compile correctly and produce...
This programming assignment will consist of a C++ program. Your program must compile correctly and produce the specified output. Please note that your programs should comply with the commenting and formatting described in the Required Program Development Best Practices document that has been discussed in class and is posted to the eLearning system. Please see this descriptive file on the eLearning system for more details. The name to use in the main configuration screen text box Name: [ ] in...
WE ARE USING PYTHON TO COMPLETE THIS ASSIGNMENT :) THANK YOU! In this programming assignment, you...
WE ARE USING PYTHON TO COMPLETE THIS ASSIGNMENT :) THANK YOU! In this programming assignment, you will write functions to encrypt and decrypt messages using simple substitution ciphers. Your solution MUST include: a function called encode that takes two parameters: key, a 26-character long string that identifies the ciphertext mapping for each letter of the alphabet, in order; plaintext, a string of unspecified length that represents the message to be encoded. encode will return a string representing the ciphertext. a...
Please do this in visual studio C++. Overview In this programming challenge, you will create an...
Please do this in visual studio C++. Overview In this programming challenge, you will create an Employee Tree application. Instructions Begin this assignment by writing your own version of a class template that will create a binary tree that can hold values of any data type. Design an EmployeeInfo class that holds the following employee information: Employee ID Number (int) Employee Name (string) Next, use the template you designed to implement a binary tree whose nodes hold an instance of...
Programming with Microsoft Visual Basic 2017: Discuss the ORDER BY clause in the SELECT statement and...
Programming with Microsoft Visual Basic 2017: Discuss the ORDER BY clause in the SELECT statement and how that can help simplify the data retrieved by the query.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT