How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask TheDoctor Your Own Question
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1757
Experience:  M.S. in Internet Information Systems
Type Your Homework Question Here...
TheDoctor is online now
A new question is answered every 9 seconds

This one is for Data structure and algorithm on C# XXXXX IS

This answer was rated:

This one is for Data structure and algorithm on C# XXXXX IS THE QUESTION... MORE LIKE A PROJECT.

You are working as a developer at RedSky INC. an organisation that manufactures and supplies products to several cities in the world. RedSky manufactures a total of five products, each with a different product ID.

The sales department of RedSky maintain the sales data for each product on a separate text file. Each record in each file contains two fields, city and sales_figure. The records in the text files are not arranged in any specific order. To search for a record in any of the text files, the files need to be read sequentially. The number of the record in each file is very high. As a result, the employees of the Sales department waste a lot of time in searching for the sales information.

To solve the problem, your project manager has assigned you the task to develop a utility called QuickSearch. This utility needs to provide the following features:

* CREATE INDEX: This option will allow a user to create an index on a text file. for creating an index, the user will be required to specify the name of the file on which the index needs to be create and the name of the index file. if an index has already been created on a file, a user should not be required to create it again the next time an operation is to be performed on the file.

* LOAD FILE: This option will allow a user to open a text file and its corresponding index file. All further operations will be performed on the file that is currently open, for loading a file, the user need to specify the name of the file. The index file the specified data file is required to be automatically located and uploaded in memory.

* INSERT RECORD: This option will allow a user to insert records into the file that is currently open. For all newly-inserted records, the index should be automatically updated.

* SEARCH RECORDS: This option will allow a user to search for the record of a particular city in the currently loaded file. To search for a record, the user needs to specify the name of the city. The search operation should work with an efficiency of O(log n).
Welcome to JustAnswer.
My name is XXXXX XXXXX I will try to help you.

If you have any file(s), Zip all files, upload the zipped file to and post download link here.
What is the deadline?
Customer: replied 4 years ago.

I have till tomorrow to submit... can you get it done and completed today ?

Can you provide me sample input and index files?
Customer: replied 4 years ago.

they did not give us any we are to do all that

How the index should be created?
Customer: replied 4 years ago.

that should be using file stream or what do you think ?

Is the application Console based or GUI based?
Customer: replied 4 years ago.

No on command prompt... but i will like to have it on both i can reward you with good bonus once this is done.

ok, I will review it and let you know ASAP.
Customer: replied 4 years ago.

alright thanks

Customer: replied 4 years ago.

good waiting

Please check back in few hours.
Customer: replied 4 years ago.


thank you...
Customer: replied 4 years ago.

how is it going ? what is the progress like ?

working on it.
My apologies. I tried a lot but lost. I am out of ideas and opting out for other Professionals to answer. Please wait. You will be notified by email as soon as any Professional joins you or you can post a new question.
I will help you with your other questions though
Thank you for your patience.
Customer: replied 4 years ago.

what have you done so far ?

Customer: replied 4 years ago.

the input should be the stocks like shoes or anything that the company can sell.. maybe car parts

Customer: replied 4 years ago.
Relist: Other.
Hello and thank you for your question. It would be my pleasure to assist you with this.

By when is this required?

Thank you
Customer: replied 4 years ago.

i need to submit it by tomorrow .. i dont know if you can get it done today .. actually the time line is meant to be 10hrs but they gave me till tomorrow ... can it be done ...

Yes. I can get this done before tomorrow.

I will contact you once it is complete.
Customer: replied 4 years ago.

alright one more think can you get it done in both GUI and command Prompt ? i will give you good bonus for this

Absolutely. I will contact you when both are ready.
Customer: replied 4 years ago.

alright thanks

Hello again,

What IDE are you currently using? Visual Studio 2010 or 2012?
Customer: replied 4 years ago.

am using 2008 ....

Are you sure that that is the version required by your course? I haven't seen a course that uses 2008 in a very, very long time. Most courses list the required version that you are to use.

Almost all courses require 2010. Recently, some courses have upgraded to 2012. Your course will have specified which version you are supposed to use. Does it indicate 2008?
Customer: replied 4 years ago.

Yes we have been working with 2008

Customer: replied 4 years ago.

Hello TheDoctor , how is the work going ? any progress yet ?

No progress yet. I am working on getting Visual Studio 2008 installed. It is so insanely outdated that it isn't readily available for download. I got the ISO and will attempt installing it from that. But since it is so outdated, I cannot be sure yet if it will even work on my computer. You are the first customer I have ever had that is using 2008. Visual Studio 2008 is no longer used by pretty much anybody. It is nonsense to teach it in a course. You will never use it in the real world and the interface will be quite different.

I will keep you updated.
Customer: replied 4 years ago.

i understand i do have the installation i can send it over to you if you want

Hello again,

I have it installing now. I actually wrote a bunch of code in 2012 before you told me 2008. So once it is installed, I will be able to simply move that over.

I'll let you know when everything is complete.
Customer: replied 4 years ago.

alright i am waiting thanks alot ... i really do appreciate it alot

Hello again,

I just wanted to give you an update.

The console application is complete. I am now working on the Windowed application.

Thank you
Hello again!

Please download the files here:


Within this zip file, you will find three folders.

The data folder contains the data files for the projects. You want to place that on your hard drive at C:

You will notice in the two classes (SalesRecord.cs, Index.cs) the locaiton is specified as C:/data/

To make that work, place the data folder at C:

If you would rather type the full path into the application (i.e., C:/data/shoe_11232.txt), then set location to be equal to an empty string:

String location = "";

The IndexConsole folder contains the application as a console application and the QuickSearch folder contains the application as a windowed application.

To run these in Visual Studio 2008, go into VS2008 C# XXXXX and choose to open project. You will navigate to the solution file (.sln) and select it to open the project.

In the console application, you start by entering the file name. The file names are:


Assuming that you did not change the location variable, you simply type in one of those file names. In the windowed applicaiton, you type it into the text field and press load.

All entries in the two applications have error handling. If it cannot find the file, it will let you know.

Once the files is loaded, you will have the option to search or insert. These are pretty self expanitory.

As the requirements state, each file is for a specific item. I have sent you two shoe items. Within the file is a value pair of city and sales.

When you load a file in either application, an index file is created. This file is read in whever the file is loaded.

When you preforma search, it uses the index, and displays the sales amount for the city you search for. If the city is not in the file, it lets you know that the city is not found.

When you insert a record, it updates the index file. If you attempt to insert a record for a city that already has a record, the applications will let you know that a record already exists.

I've tested both applications and added error handling throughout. One important part is that the application can find the text files. So either use the C:/data/ location and simply type in the file name, change the location variable to anything you want, or set the location variable to empty and type in the full file path. That is up to you.

If you choose to leave the application as is, with it pointing toward C:/data/, then you should mention that in your notes when you submit the applications to your course. Most courses require that you say something along with the submission about how the application works. You should mention that the data files are included and should be placed at C:/data/ (i.e., the data folder should be placed at C:)

Everything has been compelted and all of the requirements have been met. If you have any questions, please let me know. I'm here to help.

If you require assistance in the future, please feel free to request me direclty by starting your questions with **For TheDoctor**

Please remember to rate my answer. Thank you so much and have a wonderful day!
Customer: replied 4 years ago.

what about the window application

I sent you the windows application and discussed it in my response.

The QuickSearch folder contains the windows application. It is a Windows Forms application. It opens up in a graphical interface. It is all there and I discussed it in my response.

The indexConsole folder contains the console application

The QuickSearch folder contains the window application

Everything is there.


Let me know if you have any other questions.


Please remember to rate my answer. Thank you again.

Customer: replied 4 years ago.

sorry i need this in the command prompt

Yes, that is there also.

A command prompt application is called a console application

That is there. It is in the indexConsole application.

I did BOTH. Both are there. The indexConsole application is a "command-prompt" application.

The QuickSearch application is a windows application.

They are both there. They are both fully functional.
Customer: replied 4 years ago.

what are the file names you used ?

What do you mean? Do you mean the data files?

I detailed that at length in my answer. You must place the data folder at C:/

The data files names are:


Please make sure you read through my entire response. There is very important information in it.
Customer: replied 4 years ago.

but i try to enter it did not work says cant be found

Yes, that is because, as I stated at great length, you must place the data folder correctly.

Would you like to set a up a remote session so that I can place the data folder where it needs to be and run the application for you.

As, I stated in my original response, the data folder must be placed at C:/

If you do not move it there, then you have to change the location variable in the two classes.

If you would like a remote session, please go to

Click on the big orange button to start a remote session. If it asks you to install/accept anything, do so.

Once ready, a small dashboard will open near the top of your screen. Select the URL/Link in that dash board and the paste the link here.

I will then be able to join you.
Customer: replied 4 years ago.

ok am doing that right now

Customer: replied 4 years ago.

how do i move it to the c drive

Open your C drive in Windows Explorer and simply drag the folder over to it.

Or go to "My Computer" in Windows Explorer and drag the folder into the C drive.

I am ready to do a remote session with you if you would like. Simply follow the aforementioned instructions to get going. Once you get it going, paste the link here.

With a remote session, we can have this sorted in a couple minutes.
Customer: replied 4 years ago.

This is now working the remote section is not connecting

Go to

Click on the orange button. Make sure you allow/install everything.

A small dashboard will appear at the top of your screen. In that dashboard will be a small link. Click on it and copy it.

Paste the small link here.

Once I have that link, I will join you.
Customer: replied 4 years ago.

i have done all this its just saying connecting nothing else just connecting ... please help me resolve this i have saved the data file into my C drive and yet not working can you adjust this and send it to me all again please

Everything I sent you works perfectly. I will see if I can make an adjustment to make it easier for you. But everything I sent works perfectly if the full instructions were followed.

I'll get back to you soon.
Customer: replied 4 years ago.

please am waiting

Hello again,

Please download the update project here:


I have changed the projects so that you do not need to move anything anywhere. Simply open the solution in VS C# XXXXX 2008 and run the project.

I also change the file names to:


So that it is easier for you to type in and remember.

I have also created a screen cast that shows me opening the project, running it, and showing that it absolutely works perfectly. In it, you will see me run the search a few times, then I try to insert into a city that already has a record. You will see the handling that states that the record already exists.

You will then see me insert a record for London. You will then see me search the records for London and you will see that the returned sales figure is what I had entered.

Here is the screencast:

And yes, I made the update to the graphical application as well, if you need it.

Let me know if you have any other questions. I hope that you like what has been done. I worked very hard on it and I am certain you will receive a great grade.

Please remember to rate my answer. Thank you so much.
Customer: replied 4 years ago.

Please send me the update for the GUI and also what are the sales record you used ? because i try to enter amount it cant be found.


You need to spend $3 to view this post. Add Funds to your account and buy credits.
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1757
Experience: M.S. in Internet Information Systems
TheDoctor and 3 other Homework Specialists are ready to help you