Blog

Coursehelp
March 15, 2019
QUESTION : No Comments

(Solved) : Program Read Data Text File Produce Grade Report Data Text File Contain Class Id Title Num Q34497970

This program will read data from a text file to produce a gradereport. The data in the text file will contain the class ID (ortitle), the number of tests given in the class, and a list ofstudents and their test scores. The report will include most of thedata from the file, plus some calculated values such as eachstudent’s average test score after their lowest score is dropped,the number of students in the class, the class average and thehighest average score in the class. I’ve spent three times longeron this than I probably should have. I’m just a beginner looking tolearn C++. Please Help.

CS 210 Lab 4 Program Specifications Checkpoint due 11:59PM Sat Feb 2, 2019 Lab due 11:59 PM Wed Feb 6, 2019 Program Overview: This program will be a single-file project-no-h class definition file. You will write a program in a file named ClassReport.cpp that will read data from a text file to produce a grade report. The data in the text file will contain the class ID (or title), the number of tests given in the class, and a list of students and their test scores. The report will include most of the data from the file, plus some calculated values such as each students average test score after their lowest score is dropped, the number of students in the class, the class average and the highest average score in the class. This lab will give you more practice formatting output, and it will introduce you to using while-loops and for-loops. Output Report Specifications: Your ClassReport.cpp program will read data from a text file to produce the grade report partially shown below CS 210 Student Name Tl T2 3 T4 TSAvg ANTER ZACHARY L ARREOLA JUAN J BARBER ANTONIO D 91.8 68.8 73.1 87.4 51.1 80.3 50.1 65.0 61.3 59.3 90.0 68.9 72.7 78.5 89.6 91.8 91.3 87.8 YOKOTA YUSUKE YOUNG NICHOLAS T ZAVALA ROGELIO R 1.3 88.9 93.0 88.7 78.6 87.3 86.9 56.2 99.3 55.2 65.7 77.0 5.4 58.2 92.6 74.1 82.2 81.1 Number of Students: 31 Class Average: 79.1 Class High Average: 94.0 Input Text File Data Specifications: The data file posted with this assignment is named classData.dat The layout or format of the file will be as follows: Data Value Course ID Number of tests Name of student #1 Student #1s test scores Description The first line in the file holds the ID (Title) for the course The second line in the file holds number of tests given in the class. The third line in the file holds the first students name Each score is separated from the next with whitespace. E.g Score1 Score2 Score3 etc. Pattern repeats with name/scores pairs of lines in the file Score1 Score2 etc. (As many scores as were given in the class.) Name of student #2 Student #2s test scores Name of student #N Student #Ns test scores You may assume that any file named classData.dat will conform to the layout described above Last students name in the file Score1 Score2 etc. but you may not assume that the course ID will always be CS 210, or that the number of tests willalways be 5, or that there will always be 31 students listed, as is the case with the classData.dat file that was posted with this assignment. A portion of the files data is shown below: CS 210 ANTER ZACHARY L 91.78 68.78 73.09 87.36 51.08 ARREOLA JUAN J 50.15 65.04 61.32 59.27 89.99 YOUNG NICHOLAS T 86.92 56.22 99.3 55.24 65.69 ZAVALA ROGELIO R 75.43 58.19 92.56 74.14 82.25 Please note that a random number generator was used in an Excel spreadsheet to generate the simulated test scores, so dont be insulted if your name is given with lousy scores! Other Considerations and Requirements The Lab4Files folder posted with this assignment contains the classData.dat file. You may look at the file using your IDEs File Open menu option. For most IDEs, you should store the classData.dat file in the same folder as the ClassReport.cpp file. (If that doesnt work, try storing it in the same folder as your project file.) . .After opening the classData.dat file for input, be sure to test that the operation was successful using code similar to that shown on lines 37-40 in the Read Accounts2.cpp program posted in the Lab4Files folder. If your data file isnt successfully opened, then no other code you write will work! Everything depends on you being able to open the file and read the data from it correctly. Get your checkpoint code described in the next section of this document to work before attempting any other processing! The report generated by your program should reflect the contents of the classData.dat file. If the contents of the data file change, the contents of the report should change accordingly . . You may assume the following: 1 S the number of tests s 8. That is, there is guaranteed to be at least one test score per student, and there wont be more than 8 scores, so they will all fit on the 80-character wide console screen along with the average score if you follow the related formatting specs below Your program should end up with a for-loop nested inside a while-loop. . Display each score and average score right-justified in a field width of 6 characters, displaying exactly one digit to the right of the decimal point. Display each name left-justified in a field-width of 25 characters-you may assume no name in the data file will be longer than 25 characters Drop each students lowest score before computing their average score, unless there was only one test given in the class-then the average score for that student is simply their only test The course title is centered within the 80-character width of the console screen. HINT: Fig 5.8 on page 176 demonstrated the size) attribute of a string object. You can do some math on that as the parameter of the setw) VO manipulator introduced in Fig 5.6 on page 168 . Column headings appear above the names, scores and averages as shown in the report above. .. 80 characters are displayed above and below the detail lines of the report as shown in the report above The program computes and displays the number of students in the class in the summary at the bottom of the report as shown above . The program computes and displays the average average-score in the summary at the bottom of the report as shown above . The program computes and displays the highest average-score in the summary at the bottom of the report as shown above . The program must use appropriate style as itemized in the StyleSpecifications.pdf file posted in the Quick Links module on Canvas. SUGGESTION: The last thing you should worry about is nicely formatting the report. First get your program to read the data correctly. Then get it to produce correct computations. Only after that is done should you worry about making things look pretty Lab 4 Checkpoint Specifications The checkpoint version of your ClassReport.cpp program should echo the input from the data file to the screen, and display the number of students in the class. A portion of that output is shown below CS 210 number of tests:5 ANTER ZACHARYL 91.78 68.78 73.09 87.36 51.08 ARREOLA JUAN J 50.15 65.04 61.32 59.27 89.99 YOUNG NICHOLAS T 86.92 56.22 99.3 55.24 65.69 ZAVALA ROGELIO R 75.43 58.19 92.56 74.14 82.25 Number of Students: 31Text File Input Considerations Mixing Extraction Operations >) with getline): Study the Read_Accounts1.cpp and Read Accounts2.cpp programs posted with this assignment. They demonstrate how to open a file for input, and how to keep reading from the file until all its data has been read. You will see that its as easy to read from a text file as it is to read from the keyboard (cin). That is, you use the same extraction (>> and getline) operations no matter what input stream you are reading from. For the sake of discussion, suppose your program contains the following code to open a file for input: fstream classDataFile(classData.dat, ios::in) Heres whats really in the classDataFile input file stream: CS 210 5 nANTER ZACHARY Ln 91.78 68.78 73.09 87.36 51.08 nARREOLA JUAN J That is, it is a stream of characters, some of which are whitespace such asorn REMEMBER Warning 2 from Lab 2: The >> extraction operator ignores whitespace as it tries to extract numeric or character or string data from the input stream. If you dont want whitespace to be ignored as in the case of the space between CS and 210, or the space between first name and last name, and last name and middle initial, then you must use getline). Remember that this combination of input operations may require you to do two getline ) operations (or some of you have used ignore)). The first getline) will consume the ln following the last score on each line, and the second getline) will actually input the name Text file End-of-data Weirdness: Sometimes the last line of data in a text file does not contain an end-of-line (n) marker. This can happen when users type the data on the last line of the file and dont hit the enter key before they close the file. Alternatively, the user may hit the enter key several times at the end of a file so that there are multiple blank lines at the end of the file. This would result in an input data stream that looks like the following: cs 2101n5 ANTER ZACHARY LinZAVALA ROGELIO RIn75.43 58.19 92.56 74.14 82.25 nnnin In either case, the last line of a text file can cause challenges, especially when the program uses a mix of extraction (>> and getline() operations. This is why the while-loop in the Read Accounts2.cpp file posted with this assignment contains the following condition: while( getline (inClientFile, name) &&name) In English, this translates into While it is possible to input a line of characters from the inClientFile input stream for the name variable, and that name isnt the empty string In other words, a getline() operation may report success even though all it successfully input was an empty string! For this lab, that is not success, so the loop should terminate Note to Mac and Unix/Linux Users: The Mac and Unix OS use different end-of-line markers in their text files. Be sure to use a native text editor to open the data files I post and save them so that they will contain the native end-of-line markers used on your systems

CS 210 Lab 4 Program Specifications Checkpoint due 11:59PM Sat Feb 2, 2019 Lab due 11:59 PM Wed Feb 6, 2019 Program Overview: This program will be a single-file project-no-h class definition file. You will write a program in a file named ClassReport.cpp that will read data from a text file to produce a grade report. The data in the text file will contain the class ID (or title), the number of tests given in the class, and a list of students and their test scores. The report will include most of the data from the file, plus some calculated values such as each student’s average test score after their lowest score is dropped, the number of students in the class, the class average and the highest average score in the class. This lab will give you more practice formatting output, and it will introduce you to using while-loops and for-loops. Output Report Specifications: Your ClassReport.cpp program will read data from a text file to produce the grade report partially shown below CS 210 Student Name Tl T2 3 T4 TSAvg ANTER ZACHARY L ARREOLA JUAN J BARBER ANTONIO D 91.8 68.8 73.1 87.4 51.1 80.3 50.1 65.0 61.3 59.3 90.0 68.9 72.7 78.5 89.6 91.8 91.3 87.8 YOKOTA YUSUKE YOUNG NICHOLAS T ZAVALA ROGELIO R 1.3 88.9 93.0 88.7 78.6 87.3 86.9 56.2 99.3 55.2 65.7 77.0 5.4 58.2 92.6 74.1 82.2 81.1 Number of Students: 31 Class Average: 79.1 Class High Average: 94.0 Input Text File Data Specifications: The data file posted with this assignment is named classData.dat The layout or format of the file will be as follows: Data Value Course ID Number of tests Name of student #1 Student #1’s test scores Description The first line in the file holds the ID (Title) for the course The second line in the file holds number of tests given in the class. The third line in the file holds the first student’s name Each score is separated from the next with whitespace. E.g Score1 Score2 Score3 etc. Pattern repeats with name/scores pairs of lines in the file Score1 Score2 etc. (As many scores as were given in the class.) Name of student #2 Student #2’s test scores Name of student #N Student #N’s test scores You may assume that any file named classData.dat will conform to the layout described above Last student’s name in the file Score1 Score2 etc. but you may not assume that the course ID will always be CS 210, or that the number of tests will always be 5, or that there will always be 31 students listed, as is the case with the classData.dat file that was posted with this assignment. A portion of the file’s data is shown below: CS 210 ANTER ZACHARY L 91.78 68.78 73.09 87.36 51.08 ARREOLA JUAN J 50.15 65.04 61.32 59.27 89.99 YOUNG NICHOLAS T 86.92 56.22 99.3 55.24 65.69 ZAVALA ROGELIO R 75.43 58.19 92.56 74.14 82.25 Please note that a random number generator was used in an Excel spreadsheet to generate the simulated test scores, so don’t be insulted if your name is given with lousy scores! Other Considerations and Requirements The Lab4Files folder posted with this assignment contains the classData.dat file. You may look at the file using your IDE’s File Open menu option. For most IDEs, you should store the classData.dat file in the same folder as the ClassReport.cpp file. (If that doesn’t work, try storing it in the same folder as your project file.) . .After opening the classData.dat file for input, be sure to test that the operation was successful using code similar to that shown on lines 37-40 in the Read Accounts2.cpp program posted in the Lab4Files folder. If your data file isn’t successfully opened, then no other code you write will work! Everything depends on you being able to open the file and read the data from it correctly. Get your checkpoint code described in the next section of this document to work before attempting any other processing! The report generated by your program should reflect the contents of the classData.dat file. If the contents of the data file change, the contents of the report should change accordingly . . You may assume the following: 1 S the number of tests s 8. That is, there is guaranteed to be at least one test score per student, and there won’t be more than 8 scores, so they will all fit on the 80-character wide console screen along with the average score if you follow the related formatting specs below Your program should end up with a for-loop nested inside a while-loop. . Display each score and average score right-justified in a field width of 6 characters, displaying exactly one digit to the right of the decimal point. Display each name left-justified in a field-width of 25 characters-you may assume no name in the data file will be longer than 25 characters Drop each student’s lowest score before computing their average score, unless there was only one test given in the class-then the average score for that student is simply their only test The course title is centered within the 80-character width of the console screen. HINT: Fig 5.8 on page 176 demonstrated the size) attribute of a string object. You can do some math on that as the parameter of the setw) VO manipulator introduced in Fig 5.6 on page 168 . Column headings appear above the names, scores and averages as shown in the report above. . . 80 characters are displayed above and below the detail lines of the report as shown in the report above The program computes and displays the number of students in the class in the summary at the bottom of the report as shown above . The program computes and displays the average average-score in the summary at the bottom of the report as shown above . The program computes and displays the highest average-score in the summary at the bottom of the report as shown above . The program must use appropriate style as itemized in the StyleSpecifications.pdf file posted in the Quick Links module on Canvas. SUGGESTION: The last thing you should worry about is nicely formatting the report. First get your program to read the data correctly. Then get it to produce correct computations. Only after that is done should you worry about making things look pretty Lab 4 Checkpoint Specifications The checkpoint version of your ClassReport.cpp program should echo the input from the data file to the screen, and display the number of students in the class. A portion of that output is shown below CS 210 number of tests:5 ANTER ZACHARYL 91.78 68.78 73.09 87.36 51.08 ARREOLA JUAN J 50.15 65.04 61.32 59.27 89.99 YOUNG NICHOLAS T 86.92 56.22 99.3 55.24 65.69 ZAVALA ROGELIO R 75.43 58.19 92.56 74.14 82.25 Number of Students: 31 Text File Input Considerations Mixing Extraction Operations >) with getline): Study the Read_Accounts1.cpp and Read Accounts2.cpp programs posted with this assignment. They demonstrate how to open a file for input, and how to keep reading from the file until all its data has been read. You will see that it’s as easy to read from a text file as it is to read from the keyboard (cin). That is, you use the same extraction (>> and getline) operations no matter what input stream you are reading from. For the sake of discussion, suppose your program contains the following code to open a file for input: fstream classDataFile(“classData.dat”, ios::in) Here’s what’s really in the classDataFile input file stream: CS 210n5 nANTER ZACHARY Ln 91.78 68.78 73.09 87.36 51.08 nARREOLA JUAN J That is, it is a stream of characters, some of which are whitespace such asor’n REMEMBER Warning 2 from Lab 2: The >> extraction operator ignores whitespace as it tries to extract numeric or character or string data from the input stream. If you don’t want whitespace to be ignored as in the case of the space between CS and 210, or the space between first name and last name, and last name and middle initial, then you must use getline). Remember that this combination of input operations may require you to do two getline ) operations (or some of you have used ignore)). The first getline) will consume the ln following the last score on each line, and the second getline) will actually input the name Text file End-of-data Weirdness: Sometimes the last line of data in a text file does not contain an end-of-line (n) marker. This can happen when users type the data on the last line of the file and don’t hit the enter key before they close the file. Alternatively, the user may hit the enter key several times at the end of a file so that there are multiple blank lines at the end of the file. This would result in an input data stream that looks like the following: cs 2101n5nANTER ZACHARY LinZAVALA ROGELIO RIn75.43 58.19 92.56 74.14 82.25 nnnin In either case, the last line of a text file can cause challenges, especially when the program uses a mix of extraction (>> and getline() operations. This is why the while-loop in the Read Accounts2.cpp file posted with this assignment contains the following condition: while( getline (inClientFile, name) &&name”) In English, this translates into “While it is possible to input a line of characters from the inClientFile input stream for the name variable, and that name isn’t the empty string In other words, a getline() operation may report success even though all it successfully input was an empty string! For this lab, that is not success, so the loop should terminate Note to Mac and Unix/Linux Users: The Mac and Unix OS use different end-of-line markers in their text files. Be sure to use a native text editor to open the data files I post and save them so that they will contain the native end-of-line markers used on your systems Show transcribed image text

Expert Answer


Attached . . .

OR
OR

Have a Comment on this Question?

Questions viewed by other students


  • QUESTION : (Solved) : Would Like Help Getting Code Question C Benchmarsk Sorting Methods Listed Using Visual St Q29139380 . . .

    I would like some help getting the code for the question belowin C++.

    Benchmarsk each of the sorting methods listed below using visualstudio.

    Insertion Sort, Bubble Sort Heap Sort. Quick Sort. MergeSort.

    Benchmark each of the above sorting methods for data sizes of10000, 20000, 30000, 40000 and 50000. Display the results in atable as shown below. The table should have rows and columns.However, the rows and columns need not be separated by lines.
      

    Data Size

    Heap Sort Time In Seconds

    Merge Sort Time In Seconds

    Quick Sort Time In Seconds

    Quadratic Sort Time In Seconds

    100000

    200000

    300000

    400000

    500000

    Notes:

    ? Do not use a local array for keeping data values. Use a globalarray for this purpose. You can use dynamically allocated arrays ifyou wish.

    Generate the data using a random generator and store it in aglobal array for use in sorting. If you use a local array of largesize, you will run out of stack space.

    ? Calculate the time taken by a sort routine in seconds asbelow:

    #include

    clock_t start, finish;
    start =clock( ); //time in milliseconds
    sort( );
    finish=clock( ); //time in milliseconds
    //the constant CLOCKS_PER_SEC below is equal to 1000
    double duration = (double) ( (finish-start)/CLOCKS_PER_SEC );//time in secs.

    Expert Answer


    . . .


    view full answer
  • QUESTION : (Solved) : Write Arm Assembly Language Routine Count Number 1s 32 Bit Word R0 Return Result R1 Code F Q34564596 . . .

    Write an ARM assembly language routine to count the number of 1sin a 32‐bit word in r0 and return the result in r1.

    code:

    LDR r0, 0x11AB003F dummy value for rl (11 ones) MOV r1,#0x0 MOV r2,#32 MOVS r0,r0, ROR #1 ADDCS r1,r1,#1 SUBS r2 , r2 , #1 BNE OnesCount ; clear ones counter ;use r2 as the loop counter i Repeat: rotate ro right set Ilags ;if carry set increment 1s counter ; decrement loop counter until all bits tested OnesCount If this was a subroutine Count, the code might be area test, cODE, readwrite ADR sp, Stackl LDR r2 , =0xFFFFFFFF STR r2, [sp] LDR r0, - 0xFFAB123A BL MOV r3,rl NOP NOP ;set up dummy r2 ; dummy data :call routine ; read result Count STMFD sp!, (r2,lr] MOV r1, #0x0 MOV r2,#4 Count ; save r2 and return on the stack onesCount MOVS r0,r0, ROR #1 ADDCS r1,r1,#1 SUBS r2 , r2 , #1 BNE OnesCount LDMFD sp!, (r2,pc) ; restore r2 and returr Stack Stackl DCD 0,0,0,0,0 DCD 0,0,0,0,0

    The following image is a screendump after executing the abovecode. Register r3 contains 0x13 which is 19, the
    number of 1s in 0x11AB003F.

    CAUsers AlanCore7 Desktop ForBrusselsMay2012Chap3Problems.uvproj - pVision4 File Edit iew Project Flash Debug Peripherals Tools SVCS Window Help Registers 3Chap3Problems.asm area test, CoDE, readwrite ADR p, Stackl LDR r2,=0xEEEEEEEE STR r2, [ap] LDR ro, - 0XEEAB123A ;dummy data BL Count MOV 3,rl B Parkilere RegisterValue0 Current OF FAB123A 0x00000013 :set up dumay x2 R1 000000013 call routine : read result endless loop R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 (5P) 0x00000054 R14 (LR) 000000014 R15 (PC) 000000018 0 ParkHere NOP 0 count STMED sp!, 2,1x) MOV Nov saver and return on the stacik r1, #0x0 r2, #32 13 onescount Movs ro,r0 , ROR #1 ADDcs r1,r1, #1 SUBS r2, r2, 1 BNE Onescount 15 restore r2 and return Stack DCD o,o, o, 0,0 User/System Fast Interrupt Interrupt 20 Stack DCD 0,0,0,0,0 21 END Project E Registers Simulation

    LDR r0, 0x11AB003F dummy value for rl (11 ones) MOV r1,#0x0 MOV r2,#32 MOVS r0,r0, ROR #1 ADDCS r1,r1,#1 SUBS r2 , r2 , #1 BNE OnesCount ; clear ones counter ;use r2 as the loop counter i Repeat: rotate ro right set Ilags ;if carry set increment 1s counter ; decrement loop counter until all bits tested OnesCount If this was a subroutine Count, the code might be area test, cODE, readwrite ADR sp, Stackl LDR r2 , =0xFFFFFFFF STR r2, [sp] LDR r0, – 0xFFAB123A BL MOV r3,rl NOP NOP ;set up dummy r2 ; dummy data :call routine ; read result Count STMFD sp!, (r2,lr] MOV r1, #0x0 MOV r2,#4 Count ; save r2 and return on the stack onesCount MOVS r0,r0, ROR #1 ADDCS r1,r1,#1 SUBS r2 , r2 , #1 BNE OnesCount LDMFD sp!, (r2,pc) ; restore r2 and returr Stack Stackl DCD 0,0,0,0,0 DCD 0,0,0,0,0 CAUsers AlanCore7 Desktop ForBrusselsMay2012Chap3Problems.uvproj – pVision4 File Edit iew Project Flash Debug Peripherals Tools SVCS Window Help Registers 3Chap3Problems.asm area test, CoDE, readwrite ADR p, Stackl LDR r2,=0xEEEEEEEE STR r2, [ap] LDR ro, – 0XEEAB123A ;dummy data BL Count MOV 3,rl B Parkilere RegisterValue0 Current OF FAB123A 0x00000013 :set up dumay x2 R1 000000013 call routine : read result endless loop R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 (5P) 0x00000054 R14 (LR) 000000014 R15 (PC) 000000018 0 ParkHere NOP 0 count STMED sp!, 2,1x) MOV Nov saver and return on the stacik r1, #0x0 r2, #32 13 onescount Movs ro,r0 , ROR #1 ADDcs r1,r1, #1 SUBS r2, r2, 1 BNE Onescount 15 restore r2 and return Stack DCD o,o, o, 0,0 User/System Fast Interrupt Interrupt 20 Stack DCD 0,0,0,0,0 21 END Project E Registers Simulation Show transcribed image text LDR r0, 0x11AB003F dummy value for rl (11 ones) MOV r1,#0x0 MOV r2,#32 MOVS r0,r0, ROR #1 ADDCS r1,r1,#1 SUBS r2 , r2 , #1 BNE OnesCount ; clear ones counter ;use r2 as the loop counter i Repeat: rotate ro right set Ilags ;if carry set increment 1s counter ; decrement loop counter until all bits tested OnesCount If this was a subroutine Count, the code might be area test, cODE, readwrite ADR sp, Stackl LDR r2 , =0xFFFFFFFF STR r2, [sp] LDR r0, – 0xFFAB123A BL MOV r3,rl NOP NOP ;set up dummy r2 ; dummy data :call routine ; read result Count STMFD sp!, (r2,lr] MOV r1, #0x0 MOV r2,#4 Count ; save r2 and return on the stack onesCount MOVS r0,r0, ROR #1 ADDCS r1,r1,#1 SUBS r2 , r2 , #1 BNE OnesCount LDMFD sp!, (r2,pc) ; restore r2 and returr Stack Stackl DCD 0,0,0,0,0 DCD 0,0,0,0,0
    CAUsers AlanCore7 Desktop ForBrusselsMay2012Chap3Problems.uvproj – pVision4 File Edit iew Project Flash Debug Peripherals Tools SVCS Window Help Registers 3Chap3Problems.asm area test, CoDE, readwrite ADR p, Stackl LDR r2,=0xEEEEEEEE STR r2, [ap] LDR ro, – 0XEEAB123A ;dummy data BL Count MOV 3,rl B Parkilere RegisterValue0 Current OF FAB123A 0x00000013 :set up dumay x2 R1 000000013 call routine : read result endless loop R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 (5P) 0x00000054 R14 (LR) 000000014 R15 (PC) 000000018 0 ParkHere NOP 0 count STMED sp!, 2,1x) MOV Nov saver and return on the stacik r1, #0x0 r2, #32 13 onescount Movs ro,r0 , ROR #1 ADDcs r1,r1, #1 SUBS r2, r2, 1 BNE Onescount 15 restore r2 and return Stack DCD o,o, o, 0,0 User/System Fast Interrupt Interrupt 20 Stack DCD 0,0,0,0,0 21 END Project E Registers Simulation

    Expert Answer


    . . .


    view full answer
  • QUESTION : (Solved) : Write Arm Program Armsim Following Read Text File Called Inputtxt String Characters Upperc Q32561711 . . .

    Write an ARM program in ARMSim# that will do the following:​

    Read the text from a file called “input.txt” as a string ofcharacters
    Uppercase every consonant
    Replace all vowels with an asterisk (*)
    Output the new string from memory to a file called”output.txt”
    For example:
    “input.txt” contains “Blind love couldn’t win as the facts all camein. But I know I’ll again chase after wind. What have I got if nota thought?”
    “output.txt” should contain “BL*ND L*V* C**LDN’T W*N *S TH* F*CTS*LL CAME *N. B*T * KN*W *’LL *G**N CH*S* *FT*R W*ND. WH*T H*V* *G*T *F N*T * TH**GHT?”
    Meeting the above requirements is a bare minimum for theassignment. In order to get full credit, your program should:

    have appropriate comments
    check for errors
    have a readable output
    Please submit a single file called “project2.s” to theassignment.

    Expert Answer


    . . .


    view full answer