Find Jobs
Hire Freelancers

doubly linked list c programming

$30-250 CAD

完了済み
投稿日: 6年以上前

$30-250 CAD

完了時にお支払い
Assignment Description ************************************************************ Create a Doubly Linked List ADT in C and use it in a simulation of traffic coming through an interaction with a traffic light. The traffic light is broken and will only show a green light in one direction all other directions having a red light. Your simulation is a simulation of data and time only and does not need to have any visualization of the actual traffic going through the intersection. Make the following assumptions in terms of the intersection. -All roads are single-lane. Vehicles traveling in the same direction must proceed through the intersection in single file. -Vehicles may turn left, right, or go straight through the intersection when it is their turn to proceed. -There may be only one vehicle in the intersection at any given time. This is not how intersections are normally used, but it simplifies the simulation. -Vehicles may not turn right on a red light. -A vehicle traveling right through an intersection takes 1 second to clear the intersection. -A vehicle traveling straight through an intersection takes 2 second to clear the intersection. -A vehicle traveling left through an intersection takes 2.5 seconds to clear the intersection. -The simulation starts at time 1 which begins with a green light for cars going north. The green light moves in a clockwise fashion. Those going east would get the next green light. -A vehicle must be able to safely travel through the intersection or it will wait until it’s safe -Only cars going left may commence a turn at the start of a yellow light and only if they are the first car in the lineup when it went yellow. -The light will be green for 10 seconds, yellow for 3 seconds, and red for 14 seconds. For safety, there is 1 second where no cars will be able to go ********************************************************* Input Format ******************************************************** The data file will be space delimited and consists of three data elements in each row. The first element represents the direction the car is traveling prior to getting to the intersection. This element is represented by the letters N, S, E, W. The second element of each row represents the direction that the car will proceed through the intersection. The letters F(forward), L(left), and R(right) will be used. The third element is the time, in seconds, that the vehicle reaches the intersection. A sample set of data is shown below. N F 1 S F 2 E R 20 W R 2 W F 3 N F 3 N L 9 N R 11 W L 5 W R 8 W F 15 Your simulation must load the data file, taking the filename for the data file as a command line argument. Please note input information might not occur in order of arrival time. ********************************************************************************* Requirements: ********************************************************************************** Use four Lists, one for each initial direction of travel to simulate vehicles arriving at the intersection. Use a counter (known as a simulation clock) to move the simulation forward 1 "second" at a time. Note that you are not intended to make the simulation run in real time. Instead, the counter will advance to 1, and the simulation will make decisions about the vehicles that arrived at time 1. The simulation proceeds step by step, keeping track of the simulation clock and the time that each vehicle crossed the intersection. ********************************************************************************** Output Format *********************************************************************************** When the last simulated vehicle is through the intersection, your program should output the following report. -Include all three columns from the input data and the original position in the input file -The time the vehicle arrived at the front of the intersection -The time the vehicle finished crossing the intersection This report should be printed out to stdout. It should be formatted as a table to be easily readable and so that the different elements of the report are clearly distinguishable from one another. All information about a vehicle should be displayed in a single row and tabs should be used to separate the data. The output must follow the format shown below. Initial Vehicle Information Intersection Arrival Time Completed at Time N F 1 1 3 S F 2 2 4
プロジェクト ID: 15322792

プロジェクトについて

8個の提案
リモートプロジェクト
アクティブ 7年前

お金を稼ぎたいですか?

Freelancerで入札する利点

予算と期間を設定してください
仕事で報酬を得る
提案をご説明ください
登録して仕事に入札するのは無料です
アワード者:
ユーザーアバター
I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environment. I made many great projects using c++, for example, I made the tools which could convert java codes into c++ scripts, of course garbage collection included, this was very similar to a compiler, and was very complex. I also made our own mobile game using c++, I can show you the demo of client, if you like. I am very proficient in java also. I have a very good review on Freelancer.com, I never miss a project once I accept the job, you can check my review. Trust me, please let expert help you.
$175 CAD 2日以内
4.9 (104 レビュー)
6.8
6.8
この仕事に8人のフリーランサーが、平均$151 CADで入札しています
ユーザーアバター
Hey I can create a simulation of double linked listed in C I have good advanced expertise in C Programming Feel Free to message me We can discuss about the details in chat Regards Relevant Skills and Experience C Programming Linked List Proposed Milestones $150 CAD - Initial I have few questions to ask I hope to have a conversation with you soon
$150 CAD 0日以内
5.0 (33 レビュー)
4.9
4.9
ユーザーアバター
I, Jignesh Lakhani completed my masters from IIT Roorkee in Computer Engineering. Relevant Skills and Experience I am having very good knowledge of C, C++, Java, JavaFX, Algorithm and Data Structure. Proposed Milestones $188 CAD - project
$188 CAD 3日以内
5.0 (1 レビュー)
1.7
1.7
ユーザーアバター
I have 1 year of experience as an Software development in Java & Web development in php. Stay tuned, I'm still working on this proposal.
$155 CAD 3日以内
0.0 (0 レビュー)
0.0
0.0

クライアントについて

CANADAのフラグ
Guelph, Canada
5.0
7
お支払い方法確認済み
メンバー登録日:10月 4, 2017

クライアント確認

ありがとうございます!無料クレジットを受け取るリンクをメールしました。
メールを送信中に問題が発生しました。もう一度お試しください。
登録ユーザー 投稿された仕事の合計
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
プレビューを読み込み中
位置情報へのアクセスが許可されました。
あなたのログインセッションの有効期限がきれ、ログアウトされました。もう一度ログインしてください。