C final project collegiate level - introduction to C

Completed Posted Nov 17, 2015 Paid on delivery
Completed Paid on delivery

Final Project CS223 Fall 2015

Due : Tuesday, December 1 at the start of the class

Assignment objectives:

- Gain experience using strings, arrays, functions and their interactions

- Gain more experience using arrays (one/multi dimensional)

- Gain more experience using File Input/Output

- Gain more experience using modular programming (functions)

- Reinforce knowledge of previous programming topics

- Use of structure

- Continue to refine C programming skills by following the C coding standard

- Learn to apply "C" programming to problem solving

Problem Description:

Your spaceship is navigating an asteroid field; you are to design a system that will log and display the distance between your spaceship and the asteroids. Each asteroid has (x, y, z) position in space, where x, y, and z are the distances in kilometers (east-west, north-south, up-down) from your spaceship.

Your program will read a file [login to view URL] that represents the ID and location of each asteroid. The distance between your spaceship and each asteroid is calculated based on asteroid’s X, Y, Z position using the following formula.

√ X2 + Y2 + Z2

This program must be secure. The user must input their name and pin number, if both (name and pin) matches the list you have in a text file on the disk ([login to view URL]), than the user gets access to this program. The program should allow 3 tries for name and password entry, if unsuccessful after 3 tries the program should print a message to the user and terminate.

Program Input/ Requirements

• The name and the pin number of the user

• A file called [login to view URL] which contains names and pin numbers. Example below.

leia 12345

darth 23456

r2d2 34567

solo 45678

jabba 56789

yoda 67890

• Input to the program will be generated using random generator for X, Y, and Z coordinate. Random generator will generate numbers between 1 and 1000 (including 1 and 1000). This data will be stored in a text file called asteroid.txt. Assume the speed of asteroids is 25Km/Sec. There must be at least 10 asteroids’ data in the file. The text data file [login to view URL] has the following format: only the numbers and IDs are in the file not the heading (ID, X,Y,Z)

ID​X​Y​Z

A​600​200​59

​B​999​999​15

​C​100​1000​555

​D​500​202​666

​-​-​-​-

​-​-​-​-

Program output / Requirements

1- Write the following data to a file called [login to view URL], after calculating the distance

A​600​200​59​(whatever the result is)

B​999​999​15​(whatever the result is)

C​100​1000​555​(whatever the result is)

​D​500​202​666

​-​-​-​-​- ​-​-​-

2- Print an alarm message to screen with X, Y, and Z positions of asteroids within a distance of less than 750 km.

For the nearest asteroid, send an alarm message to the console followed by 7 beeps.

The alarm message could look like the following: only two digits after the decimal point.

Warning - Warning - Warning

Nearest asteroid B at ??, ??, ??: ?? km away

Time to impact ??? seconds

asteroid B at at ??, ??, ??: ?? km away

asteroid D at at ??, ??, ??: ?? km away

- - - - - - - - - - - - - - - -- - - - - - - - - - - - - -- - - - - -

- - - - - - - - - - - - - - - -- - - - - - - - - - - - - -- - - - - -

3- Display a bar chart (character) for distance of the asteroids.

Example (something like below):

​A |****************************

​B |*********************

​C |*************************

​D |*******

​E |************

​F |

|

|

0------|------|------|------|------|------|------|-------------------------------------------------

Scale appropriately

More requirements, In addition to our standards:

1. The [login to view URL] file can contain at least 10 names and pin numbers.

2. Your program should be able to process the minimum of 10 asteroids.

3. You must use a two dimensional array for the asteroids position data.

4. You must use structure to hold the data for name and ID number when you read the file [login to view URL]

5. The main function must do very little other than calling other functions and passing parameters to those functions.

6. Your program should be modularly designed with functions designed to do one task and one task well.

7. Use of pointers for arrays are encouraged

8. Do not use global variables. Pass data back and forth via parameters or as return values.

9. Make your functions as general as possible so that they can be called more than once if needed.

10. Document your main function as well as every function you write.

11. Use defined constants for ALL constants in your program.

General requirement

1- Following comments must be the first lines of your source code

/* -----------------------------------------------

​ Submitted By: <Your Name>

​ Homework Number: <whichever homework you are doing>

​ Credit to:

​​ <Name or names>

​ Submitted On: <Date>

​ By submitting this program with my name,

​ I affirm that the creation and modification

​ of this program is primarily my own work.

------------------------------------------------ */

2- Next few line of your source code must be comments describing what this program is supposed to do.

3- The first output (display) must be your name

4- The source code file must include comments documenting the design.

5- Indentation and spacing should be used to make the program readable.

6- Throughout this class (including this program you are not permitted to use the following commands: continue, break, exit, or any library functions that perform similarly

Deliverables:

Delivery Requirements:

For this project you must submit a report that includes the following sections:

• Time log

• Describe the REQUIREMENT of this program (what does the customer want), in bulleted format.

• Design, block diagram of functions used.

• Function description

• Comment your implementation (your code)

• Develop at least five TEST SCRIPT to test your program

• Conclusion

No hard copy of the code is needed; submit the soft copy of your source code (the .c file) to blackboard

IMPORTANT: You must name your source code as below:

Yourusername_homeworknumber_cs223

Example: behif_h1_cs223

C Programming

Project ID: #8923631

About the project

24 proposals Remote project Active Nov 18, 2015

Awarded to:

mradula2

I was a Instructor for C programming in my Graduate studies. I have designed such questions previously. I am a working professional in a corporate industry. I am confident that I will complete the project on time.

$111 USD in 6 days
(1 Review)
2.1

24 freelancers are bidding on average $107 for this job

hbxfnzwpf

I am very proficient in c, c++. I have 16 years c++ developing experience now, and I have worked for 6 years. My work is online game developing, and mainly focus on server side, the language is c++ under linux. I used More

$150 USD in 3 days
(143 Reviews)
7.0
AwaisChaudhry

Hello Sir, I am C Programmer, I have seen the detail I can do this project for you if you will give me all the details, If you think my profile, reviews and completion rate worth giving a chance then contact me for fur More

$206 USD in 3 days
(9 Reviews)
6.5
dobreiiita

Hello I am C expert and interested in this project. I have reviewed your requirements and confident to handle this project perfectly. I also have a lot of experience in helping students with assignments so I w More

$150 USD in 2 days
(106 Reviews)
6.2
mahershahmeer

A proposal has not yet been provided

$100 USD in 3 days
(82 Reviews)
5.9
rajeshpal007

A proposal has not yet been provided

$30 USD in 1 day
(22 Reviews)
5.0
zuiguanglong

A proposal has not yet been provided

$100 USD in 3 days
(7 Reviews)
4.4
trhoan00

Hello, I'm a senior C developer. I can finish this project. Thank you for reading my bid

$111 USD in 5 days
(8 Reviews)
3.8
Calleus

Hi, I have strong background in C/C++ and experience in Programming. Let me help you. I am ready to start. Please send me a message so we can discuss.

$155 USD in 3 days
(8 Reviews)
4.0
SharjeelSohail

Hi, I'm an Electrical / Computer Science Engineer, excellent in Mathematics and C programming. I can do this work for you.

$60 USD in 3 days
(2 Reviews)
2.6
satishiiith

A proposal has not yet been provided

$155 USD in 3 days
(4 Reviews)
2.6
mikevanvertloo

A proposal has not yet been provided

$133 USD in 3 days
(2 Reviews)
1.4
chiguire

Student of Computer Science in college. I have plenty experience in C programming and projects like this. Will start working right after you award me to assure you it will be complete before the due date.

$80 USD in 7 days
(1 Review)
1.6
georgegach

Greetings! I'm professional C programmer and ready to deliver your project whenever you want. Cheers

$95 USD in 2 days
(0 Reviews)
0.0
Gwen26

I'm an IT engineer specialized in Software Development. C language is one of my main development language. Your final project will be easy to do and you will get fast result. Will be happy to work with you. Do not h More

$111 USD in 2 days
(0 Reviews)
0.0
bsef12a046

I am very good at c programming and i studied c programming for a year in my software engineering degree and got 95 marks out 100 in c programming. I love programming and i am a good programmer. I have done man c langu More

$30 USD in 3 days
(0 Reviews)
0.0
dimitriospl

Hello, my name is Dimitris and I am a Computer Engineer from Greece. I studied at Aristotle University Of Thessaloniki. During my academic years I have completed various assignments in the following fields: -Paral More

$88 USD in 3 days
(0 Reviews)
0.0
YYevs

I have developed several final projects for my clients. I have experienced writing code and comments to it so as teachers would be happy to grade it with the highest score.

$100 USD in 1 day
(0 Reviews)
0.0
joanlaska

A proposal has not yet been provided

$155 USD in 3 days
(0 Reviews)
0.0
shubham771

I have done a lot of coding in C. .

$30 USD in 3 days
(0 Reviews)
0.0
WilliamXi

Hello, I am a computer science graduate student from University of Southern California. C & C++ are my mainly used programming language. I have completed plenty of course projects similar to this one before. This proje More

$150 USD in 3 days
(0 Reviews)
0.0