The Programming Language is C++
Objective:
The purpose of this project is to expose you to:
One-dimensional parallel arrays, input/output, Manipulating summation, maintenance of array elements. In addition, defining an array type and passing arrays and array elements to functions.
Problem Specification:
Using the structured chart below, write a program to keep records and print statistical analysis for a class of students. There are three quizzes for each student during the term. Each student is identified by a four-digit student ID number. The number of students in the class is unknown, therefore we need to detect end of file to stop. The file pr2data.txt is included and contains the data.
The program calculates the statistics for each student and for each quiz as shown in the sample output. The output goes to a file and is in the same order as the input and should be similar to the following: any other improvements to the output are welcomed.
CIS Department – Fall 2018
CIS 161 Class Statistics
Student Quiz 1 Quiz 2 Quiz 3 Average
1234 78 83 87 82.67
2134 67 77 84 76.00
3124 77 89 93 86.33
High score 78 89 93
Low score 67 77 84
Quiz Average 73.4 83.0 88.2
pr2data
1234 52 70 75
2134 90 76 90
3124 90 95 98
4532 21 17 81
5678 20 22 45
6134 34 45 55
7874 60 99 56
8026 70 10 66
9893 34 09 77
2233 78 20 78
1947 45 40 88
3456 78 55 78
2877 55 50 95
3189 70 98 78
2132 77 97 80
4602 89 50 91
3445 78 60 78
5405 35 33 15
4556 78 20 18
6999 88 98 89
9898 48 78 68
2323 78 20 78
Requirements:
Grading Criteria:
5 points There are sufficient comments in the programs.
5 points use the typedef to define all arrays.
5 points a flowchart of the function main () is included and is correct (only main()).
5 points use a counter to count the number of elements read.
5 points generate an error if file does not exist, or if not open.
10 points loop is included and reads the data until it encounters the end of file.
5 points proper passing by value/by reference for all functions.
5 points the function findstavg () finds the float average for each student.
5 points the function findhigh () is clear correct and returns the highest quiz.
5 points the function findlow () is clear correct and returns the lowest quiz.
10 points the function findqzavg () is clear correct and returns a quiz average.
5 points every function has specifications.
5 points headings, column titles are printed, formatted and looks nice.
5 points data/calculated results are printed with proper spacing and proper formatting.
15 points the program runs correctly and produces the intended results.
5 points output are printed to a file.
In: Computer Science
Design an Essay class that is derived from the GradedActivity
class:
class GradedActivity{
private:
double score;
public:
GradedActivity()
{score = 0.0;}
GradedActivity(double s)
{score = s;}
void setScore(double s)
{score = s;}
double getScore() const
{return score;}
char getLetterGrade() const;
};
char GradedActivity::getLetterGrade() const{
char letterGrade;
if (score > 89) {
letterGrade = 'A';
} else if (score > 79) {
letterGrade = 'B';
} else if (score > 69) {
letterGrade = 'C';
} else if (score > 59) {
letterGrade = 'D';
} else {
letterGrade = 'F';
}
return letterGrade;
}
The Essay class should determine the grade a student receives on an
essay. The student's essay score can be up to 100, and is made up
of four parts:
The Essay class should have a double member variable for each of
these sections, as well as a mutator that sets the values of these
variables. It should add all of these values to get the student's
total score on an Essay.
Demonstrate your class in a program that prompts the user to input
points received for grammar, spelling, length, and content, and
then prints the numeric and letter grade received by the
student.
In: Computer Science
Write a Python program that prompts the user to enter a list of words and stores in a list only those words whose first letter occurs again within the word (for example, 'Baboon'). The program should display the resulting list..................please explain step by step
In: Computer Science
Create a Software Application for XYZ Bank that allows its members to access their bank account information through an “ATM like” interface. The Menu Options should include: checking the account balance, debiting the account and crediting the account, along with an option to exit the program.
Create an Account Class to represent the customers’ bank accounts. Include a data member of type float to represent the account balance. Provide a constructor that receives an initial balance and uses it to initialize the data member.
Can someone please help me in Creating a console application in C++ that meet the requirements outlined above. With comments Lines
In: Computer Science
Create a program that implements a singly linked list of Students.
Each node must contain the following variables:
In main():
|
Student_ID |
Student_Name |
|
00235 |
Mohammad |
|
00662 |
Ahmed |
|
00999 |
Ali |
|
00171 |
Fahad |
|
Student_ID |
Student_Name |
|
00236 |
Salman |
|
00663 |
Suliman |
|
00998 |
Abdulrahman |
In: Computer Science
How would i write a MIPS program that converts 2 decimals to binary
In: Computer Science
What would be the result of each of the following programs?
|
1 |
public class
RecursionInJava1{ } Public static int guess(int num){ if (num == 1) return 0; else return (guess(num-2)-num); } } |
|
|
2 |
public class
RecursionInJava2{ } } } |
In: Computer Science
Write a C function gcd that returns the greatest common divisor of two integers. The greatest common divisor (GCD) of two integers is the largest integer that evenly divides each of the two numbers.
In: Computer Science
Q6.13) Unary minuses can be added in several ways to the arithmetic expression grammar of Figure 6.17 or Figure 6.18. Revise the BNF and EBNF for each of the cases that follow so that it satisfies the stated rule:
expr → expr + term | term
term → term * factor | factor
factor → ( expr ) | number
number → number digit | digit
digit → 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
[Figure 6.17. Revised grammar for simple integer arithmetic expressions]
expr → term { + term }
term → factor { * factor }
factor → ( expr ) | number
number → digit { digit }
digit → 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
[Figure 6.18 EBNF rules for simple integer arithmetic expressions]
(a) At most, one unary minus is allowed in each expression, and it must come at the beginning of an expression, so -2 + 3 is legal (and equals 1) and -2 + (-3) is legal, but -2 + -3 is not.
(b) At most, one unary minus is allowed before a number or left parenthesis, so -2 + -3 and -2 * -3 are legal, but --2 and -2 + --3 are not.
(c) Arbitrarily many unary minuses are allowed before numbers and left parentheses, so everything above is legal.
In: Computer Science
This is a request for Java High Scores Program with 2 files.
Rewrite the high scores assignment(code below) so that the names and scores are stored in an array of HighScore objects instead of parallel ArrayLists.
The new Program should have the same output as the original. Here is a sample run of the program:
Enter the name for score #1: Suzy
Enter the score for score #1: 600
Enter the name for score #2: Kim
Enter the score for score #2: 9900
Enter the name for score #3: Bob
Enter the score for score #3: 1012
Enter the name for score #4: Armando
Enter the score for score #4: 8000
Enter the name for score #5: Tim
Enter the score for score #5: 514
Top Scorers:
Kim: 9900
Armando: 8000
Bob: 1012
Suzy: 600
Tim: 514
Step 1: The HighScores class
Begin by creating the HighScore class. It should have the following design
Class HighScore
|
String name int score |
|
HighScore(String n, int s) void setName(String n) String getName() void setScore(int s) int getScore() |
Step 2: The HighScoresProgram
Create a separate file named HighScoresProgram.java. This file should contain a class that has only four following static methods.
public static void main(String args[])
public static void initialize(HighScores[] scores)
public static void sort(HighScores[] scores)
public static void display(HighScores[] scores)
The main method should allocate an array of five HighScore references, and then invoke the other three methods.
What to Submit?
Submit HighScores.java HighScoresProgram.java
Here is previous code to build from:
import java.util.*;
public class HighScores{
public static void main(String[] args){
ArrayList<String> names = new ArrayList<>();
ArrayList<Integer> scores = new ArrayList<>();
initialize(names, scores);
sort(names, scores);
System.out.println("\n\nTop Scorers:");
display(names, scores);
}
// user input is done in a method named initialize
public static void initialize(ArrayList<String> names, ArrayList<Integer> scores){
int i=1;
Scanner input=new Scanner(System.in);
String choice;
do{
System.out.print("\nEnter the name for score #" + i + ": ");
names.add(input.next());
System.out.print("Enter the score for score #" + i + ": ");
scores.add(input.nextInt());
System.out.print("Do you want to add another score? (y/n): ");
choice = input.next();
i++;
}
while(choice.equalsIgnoreCase("Y"));
}
// function that sorts both array lists, based on the values in the scores array list
public static void sort(ArrayList<String> names, ArrayList<Integer> scores){
int count = scores.size();
int tempScore;
String tempName;
for (int i = 0; i < count - 1; i++){
for (int j = i + 1; j < count; j++){
if (scores.get(i) < scores.get(j)){
tempScore = scores.get(i);
scores.set(i, scores.get(j));
scores.set(j, tempScore);
tempName = names.get(i);
names.set(i, names.get(j));
names.set(j, tempName);
}
}
}
}
// method that displays the contents of the two arraylists
public static void display(ArrayList<String> names, ArrayList<Integer> scores){
for (int i = 0; i < scores.size(); i++){
System.out.println(names.get(i) + " : " + scores.get(i));
}
}
}In: Computer Science
Language: Java(Netbeans)
Implement a simple calculator.
In: Computer Science
Write a Java program to print the pattern of asterisks shown below.
For i=1
*
For i=2
*
* *
For i=3
*
**
* * *
For i=n
*
* *
* * *
… … …
* * * * * * ……… n
In: Computer Science
In: Computer Science
Use C programming to Implement the breadth-first tree traversal. The tasks are:
a) Build the tree.
b) Perform breadth first traversal on the tree that you have built at step
a).
Note: "Please comment the program"
In: Computer Science
How do I implement
public class CircularArrayQueue<E> extends AbstractQueue
<E> and test the methods with junit?
In: Computer Science