In this project, you will create your own on-line shopping store in the console application. You can choose different products to sell in your store (at least 8 products). You will create an product...

1 answer below »
C# Program in Visual basics needed.. no java please


In this project, you will create your own on-line shopping store in the console application. You can choose different products to sell in your store (at least 8 products). You will create an product inventory text file. The program will display two options at the beginning of the program, Customer and Manager. Customer: If this is a new customer, the program will let customer to register with their information and assign a unique ID number to the new customer. The customer will enter the customer id every time when they are shopping in your store and the program will keep tracking the total amount the customer spend each time to determine the discount level. You can create your discount level rule or use the rule in the assignment 4. The program has to keep tracking the products inventory. If customer select the product that is out of stock, the program has to display a warning message and let customer continue to shop. After customer finish selecting the products, the program will calculate the subtotal, apply the discount, calculate the tax, and the total. The program will display a receipt on the screen and save it to a text file with customer information. (Just like the HEB receipt). Manager: The manager option has to be password protected. The program will give the manager two option: 1. Display the inventory: display all the products stock information 2. Restock the products: add more stock for each product You have to create different classes and utilize the inheritance features. You have to text files to keep all the information the program need. You can check some on-line store to get some ideas (Amazon, Walmart …). Make sure your program does not end unexpectedly and let user have the option to continue.
Answered Same DayOct 28, 2021

Answer To: In this project, you will create your own on-line shopping store in the console application. You can...

Neha answered on Nov 02 2021
153 Votes
ConsoleApplication1/.vs/ConsoleApplication1/v14/.suo
ConsoleApplication1/ConsoleApplication1.sln
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication1", "ConsoleApplication1\ConsoleApplication1.csproj", "{749D6F39-A7B4-4413-9A7A-D11B7C8A16BF}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|An
y CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {749D6F39-A7B4-4413-9A7A-D11B7C8A16BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {749D6F39-A7B4-4413-9A7A-D11B7C8A16BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {749D6F39-A7B4-4413-9A7A-D11B7C8A16BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {749D6F39-A7B4-4413-9A7A-D11B7C8A16BF}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
EndGlobal
ConsoleApplication1/ConsoleApplication1/App.config




ConsoleApplication1/ConsoleApplication1/bin/Debug/ConsoleApplication1.exe
ConsoleApplication1/ConsoleApplication1/bin/Debug/ConsoleApplication1.exe.config




ConsoleApplication1/ConsoleApplication1/bin/Debug/ConsoleApplication1.pdb
ConsoleApplication1/ConsoleApplication1/bin/Debug/ConsoleApplication1.vshost.exe
ConsoleApplication1/ConsoleApplication1/bin/Debug/ConsoleApplication1.vshost.exe.config




ConsoleApplication1/ConsoleApplication1/bin/Debug/ConsoleApplication1.vshost.exe.manifest









ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.csproj



Debug
AnyCPU
{749D6F39-A7B4-4413-9A7A-D11B7C8A16BF}
Exe
Properties
ConsoleApplication1
ConsoleApplication1
v4.5.2
512
true


AnyCPU
true
full
false
bin\Debug\
DEBUG;TRACE
prompt
4


AnyCPU
pdbonly
true
bin\Release\
TRACE
prompt
4
























ConsoleApplication1/ConsoleApplication1/customer.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
public class customer {
public void addcustomer()
{
string Name = "";
string Email = "";
string Phone = "";
int Id = 0;
CustomerDetails detail = new CustomerDetails();
detail.Id = Id.ToString();
detail.Name = Name;
detail.Email = Email;
detail.Phone = Phone;
Console.WriteLine("Please enter the Customer Name: ");
Name = Console.ReadLine();
Console.WriteLine("Please enter the Email: ");
Email = Console.ReadLine();
Console.WriteLine("Please enter the Phone: ");
Phone = Console.ReadLine();
string line = "";
StreamReader file = new StreamReader(@"C:\Users\Raghav\Desktop\customer.txt");
bool test = true;
while (test == true)
{
Random random = new Random();
Id = random.Next(100);
if (line.Contains(Id.ToString()))
{
test = true;
}
else
test = false;
}
file.Close();
string fullText = (Id + " # " + Name + " # " + Email + " # " + Phone);
File.AppendAllText("C:\\Users\\Raghav\\Desktop\\customer.txt", fullText + Environment.NewLine);//can't get this way working, even after switching "\"s to "/"s. It says that the file is being used by another process.
Console.ReadLine();
}
public void buyproduct(int id)
{
string line;
string input = id.ToString();
StreamReader file = new StreamReader(@"C:\Users\Raghav\Desktop\customer.txt");
while ((line = file.ReadLine()) != null)
{
if (line.Contains(input))
{
Console.WriteLine("Customer Details:");
Console.WriteLine(line);
Product prod = new Product();
bool ans = true;
while (ans == true)
{
Console.WriteLine("Enter 1 to continue and 0 to exit");
int n = Convert.ToInt16(Console.ReadLine());
if (n == 1)
{
prod.viewproduct();
Console.WriteLine("Enter product Id");
int prodId = Convert.ToInt16(Console.ReadLine());
string data;
string lastWord = "";
StreamReader fs = new StreamReader(@"C:\Users\Raghav\Desktop\product.txt");
while ((data = fs.ReadLine()) != null)
{
if (data.Contains(input))
{
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here