Off Topic A place for you CBR junkies to boldly go off topic. Almost anything goes.

NEED C PROGRAMMING HELP!!!

Thread Tools
 
Search this Thread
 
  #1  
Old 11-18-2008, 07:12 PM
redzintimidator's Avatar
Senior Member
Thread Starter
Join Date: Aug 2007
Location: Greene, NY
Posts: 2,950
Likes: 0
Received 0 Likes on 0 Posts
Default NEED C PROGRAMMING HELP!!!

hey guys, one thing..i suck at c programming. The current lab i am on i need a ton of help on. I was wondering if any of you that know the c language can help me with this. If anyone can do this, please do!!! I know some of you can sit down and have this in 20 minutes...i would love to learn this, and i intend to from one of my friends, but i cannot learn from this professor and no one else in my class really can either. Thanks for any help you can give me!
Here is what i need to do:

In this lab, you will work with structures, linked lists and more advanced sorting algorithms.
Setup
Create a new directory and in it create two new C code files. The first, named lab5.c, should contain no functions other than main(), and perhaps any support functions used by it for the main program's functions. The second C file, named stlist.c, should start out empty.
Create a new header file named stlist.h, and '#include' it in both C files.
Then, write a Makefile which will compile, assemble and link this file into an executable called "lab5". Do not forget to add "-Wall" to each gcc command. Then, run "make" from within that directory and be sure your Makefile works. Don't forget to include the header file as a dependency for both .c files.
Project
Create a C struct used to store data for a student in this class, as part of a singly-linked list (you'll need a "next" pointer). The data for a student must include:
[ul][*]B-Number (as an 'unsigned int')[*]First name (up to 18 characters, not inluding the NULL)[*]Last name (also up to 18 characters, not inluding the NULL)[*]9 quiz grades[*]5 project grades[*]Midterm grade[*]Final project grade[*]Optional final exam grade - which must be zero if not taken [/ul]
Each 'grade' should be a 'char' (either signed or unsigned, your choice) type, since it can only range from 0 to 100, inclusive. The definition for this struct should be written in your stlist.h header file.
Define a static global "head" pointer for this list, and a set of functions for manipulating this list in your stlist.c file. A declaration for each of these functions - along with detailed descriptions of each, should be placed in the stlist header file. You must provide, with the functions in this file, at least the following functionality:
[*]Input, from the user, a set of student data for one student. Verify this data is valid (not a duplicate B-Number, all grades from 0-100, etc...). If it is, add it to the beginning of the list.[*]Remove the first student from the list.[*]Print the list of students, plus all calculated grades (see note below).[*]Remove a student by b-number (input by the user).[*]Print all the info of a student by b-number (input by the user), plus all calculated grades (see note below).[*]Sort the list by students' last names (then first names, if the last names are the same - then B-Number if both names are the same) using the Radix Sort algorithm.[*]Sort the list by student's final course grade using the Insertion Sort algorithm.[*]Save the entire list to a text file (see note below). The filename should be requested from the user.[*]Load (and replace) the entire list from a text file (see note below). The filename should be requested from the user. [/ol]
Note: 'All caclulated grades' includes the calculated quiz average (dropping the lowest two), lab average (using 2, 3, 30, 35, 30 as the lab weights, respectively) and the final course number and letter grades. All calculated grades must be rounded off to exactly two decimal places.
Note: Saving to and loading from a text file must use a specific format. Each item (number, name, grade, etc...) should be printed by itself (no extra text describing or labeling anything) on its own line, with no blank lines between them. They should be in the exact order as they are listed above. There should be one blank line after each student entry. The "b-number" should be printed as just the number (without the 'B') in decimal, and it can leave off the leading 0s. Here is an example file:
[blockquote]101011
JustinPolhamus
100
100
100
0
100
100
100
100
0
100
100
86
99
96
99
94
0

202201
John
Smith
56
64
45
57
57
84
55
87
75
90
80
25
24
10
68
15
26
[/blockquote]
Add to your main function the ability to test all of these features interactively. How exactly you do this is up to you, but all required features must be easily testable by the user, and you can expect the CAs will have their own data files to load and test your code with.
 
  #2  
Old 11-18-2008, 07:31 PM
mrfisher's Avatar
Member
Join Date: Mar 2008
Posts: 41
Likes: 0
Received 0 Likes on 0 Posts
Default RE: NEED C PROGRAMMING HELP!!!

Out of curiosity, what's your major? Is this lab working toward embedded (uC) programming or more computer-science type stuff?
 
  #3  
Old 11-18-2008, 07:42 PM
redzintimidator's Avatar
Senior Member
Thread Starter
Join Date: Aug 2007
Location: Greene, NY
Posts: 2,950
Likes: 0
Received 0 Likes on 0 Posts
Default RE: NEED C PROGRAMMING HELP!!!

EE - Electrical Engineering...basically i will take this class and never have to program again...thats all computer science people and computer engineering..they can do that i dont want to and wont for a job.
 
  #4  
Old 11-18-2008, 07:44 PM
Join Date: Sep 2008
Location:
Posts: 158
Likes: 0
Received 0 Likes on 0 Posts
Default RE: NEED C PROGRAMMING HELP!!!

Sorry, I can't be of any help. The closest thing I know to C is Java, and I took that a while ago. There are forums on the web specializing in programming that would be way more help that most any of us would in regards to this problem (not saying someone on here can't help, just they specialize in it) I would definitely check one of those out. There are also "teach yourself basic C" sites out there of you it would like to learn the language.
Try here

http://www.cprogramming.com/

This is why my major is Network Engineering, and not CS
 
  #5  
Old 11-18-2008, 08:03 PM
mrfisher's Avatar
Member
Join Date: Mar 2008
Posts: 41
Likes: 0
Received 0 Likes on 0 Posts
Default RE: NEED C PROGRAMMING HELP!!!

Yeah, they always try to make EE's take C so they can program microcontrollers and stuff. What sucks is that there are cross-compilers that you can use with BASIC and you'll have working code in 1/3 the time. With no managing libraries. I really don't get it.
 
  #6  
Old 11-18-2008, 08:23 PM
woo545's Avatar
Senior Member
Join Date: Jun 2007
Location: PA
Posts: 2,680
Likes: 0
Received 1 Like on 1 Post
Default RE: NEED C PROGRAMMING HELP!!!

Criminy. They require you to take C for EE? Thats screwed up. I would have thought a structured program and design class first so that you can more easily plan this out. I don`t remember squat from C, except a crap load of semi-colons and pointers.

Have you gotten anywhere with this? Is this from a book?
 
  #7  
Old 11-18-2008, 08:26 PM
woo545's Avatar
Senior Member
Join Date: Jun 2007
Location: PA
Posts: 2,680
Likes: 0
Received 1 Like on 1 Post
Default RE: NEED C PROGRAMMING HELP!!!

Don`t tell me this is due tomorrow.
 
  #8  
Old 11-18-2008, 08:51 PM
Join Date: Apr 2008
Location: Pittsburgh, Pennsylvania
Posts: 639
Likes: 0
Received 0 Likes on 0 Posts
Default RE: NEED C PROGRAMMING HELP!!!

As a ME major I had to take C programing course as well. I don't remember any of it though, so I wouldn't be much help.
 
  #9  
Old 11-18-2008, 10:06 PM
redzintimidator's Avatar
Senior Member
Thread Starter
Join Date: Aug 2007
Location: Greene, NY
Posts: 2,950
Likes: 0
Received 0 Likes on 0 Posts
Default RE: NEED C PROGRAMMING HELP!!!

nope...due friday... and its not out of a book...and we were taught a very very basic implementation of a structure
right now i just need to pay someone to do it...lol
 
  #10  
Old 11-13-2023, 07:48 AM
Al1040's Avatar
Welcome crew
Join Date: Jan 2021
Location: Preston, UK
Posts: 2,123
Received 315 Likes on 293 Posts
Default

Ronfisher, you are replying to a post from 2008! I think he may have sorted it by now or given up
 


Quick Reply: NEED C PROGRAMMING HELP!!!



All times are GMT -5. The time now is 12:04 PM.