hw-03 | programming language design - spring'2007, dr. s. yurttas - solution
rationale
This is another assignment to practice and show that you're able to compose an application using given components by adapting/extending to new uses other than given types.

You'll practice the fundamentals of programming using imperative language abstraction mechanisms in C++ and Java or C# to compose and structure an application using multiple functions/methods.

problem
You'll write an application in C++ to transcribe DNA to RNA, i.e., T->U and print out top N count valued sequences to a named file as follows:
      -> dna filenames : dna-filenames.txt

      [ input sequences -
        dna-00 :
        AAGTCTAGTACCC
        CAGAGTAGGACCT
        AAGAGTAGGACCG
        AAGACTAGGACCA
        CAGAAGTTGTCGT
        GCCTTGTGGACCC

        dna-01 :
        .
        .
        .
      ]

      -> top N : 3

      -> output filename : dna-counts.txt

      [
        dna-00 :
        5. CAGAAGUUGUCGU - 4
        1. AAGUCUAGUACCC - 2
        2. CAGAGUAGGACCU - 2

        dna-01 :
        .
        .
        .
      ]

      
  • For each set of given files: list the sequence number, transcribed RNA sequence, and the count value.
  • Filename for the given datafiles read in, interactively, from command-line.
  • You'll do this repetitively until user decides as N, interactively, from the command-line.
  • You'll create one output file.
  • Structuring and composition multiple functions in C++ will be the essence of grading, as well as correctness.
  • Structuring and composition as static methods in C#|Java or multiple functions in C++ will be the essence of grading; as well as, correctness.
  • You will use and reuse C#, Java, and C++ collections.
credit : 10 points due March 2, by 11pm.

Valid XHTML 1.0 Transitional