York-logo

CSE2031 - Software Tools

Assignments

 

General Information

 

Course Information

 

Grading Policy

 

Lecture Schedule

 

Assignments

LAB

Exam information

 

Schedule

Assignment

Due Date

Assignment 1 May 25, 2010 at 6.00pm
Sample inputs and outputs samples.zip
Assignment 2 July 5, 2010 at Midnight
test cases
Assignment 3 Deadline extended: Aug 4, 2010
July 31,2010 at Midnight
Files to download

A3:

You can use bc instead of expr to multiply numbers read from file.Simple example val=x*y will look like that
val=`echo "$x*$y"|bc`
In part D: "file" reffers to a set of lines printed to standard output not a file created on disk!
Please create and use the file .cse2031_db to construct any paths in your scripts.
DO NOT HARDCODE ABSOLUTE PATHS IN YOUR SCRIPTS!

Important A1:

Submit directory is now ready for your submission. Let me know if you have any problems with submit command.

When comparing strings (arrays of chars) you should use function strcmp(char *s1, char *s1) from the library string.h. This function returns 0 when s1 and s1 are equal and non-zero value otherwise. Operator '==' does compare only pointers! So myStr=="kg" will always fail!

Assignement 2 Q&A's:

  • Please follow the format of printing from specification so:
    |CustId| Surname | Name | Account balance|
  • If user provide wrong/incorrect input, you should provide proper response/information dependiing on type of error.

Assignement 1 Q&A's:

  • Should the line number be returned in the Error message?: No. You can return just one of messages (Overflow, Wrong format, Wrong unit, Too few records)
  • Should the asking user input prompt appears after each input or should it only appear once?: It should appear only once
  • Are you expecting us to verify the input overflow? for example, if user input range not in 0-100kg or 0-200lb, it will give us overflow message? or Are you expecting us to test whether the delta will overflow? I expext you to verify whether the input is in range
  • If user only input one value, i.e. 10lb, then he enters clr+d, then what error message I should return ? Too few records
  • Could we just convert the final result to lb or is it necessary to convery each entry to lb? Depends on the method your're using.
  • Could you explain what triggers the below error conditions?
    • Wrong format - no integer i.e. xx123xx or kg111
    • Wrong unit - the unit was not kg or lb
    • Overflow - entry bigger than 100kg or 200lb
    • Too few records - less than two correct entries