Programming Project #6: Bowling Team
need to use python
Problem
Expected Duration: 3-4 hours
Prerequisites: None
Knowing that you are a budding programmer, your friends have
asked you to create a scoring program for your Saturday bowling
league. Your program should take a name, team number, and score for
each player, and should deal with any number of players, but have 3
people to a team.
Your program should ignore invalid inputs, and not crash. Your
program should print the following lists in columns:
Last, your program should write each of the lists and the
summary information
to a text file called game_results.txt in the same format it is
displayed on the screen.
Note: You have the option of using pandas Dataframes in your
program. Just make sure the console and file output
has the required structure and format.
In: Computer Science
Task use c++ and Create Base class task with virtual method Create a pair of derivative classes of architecture, scientist, economist - Define a salary in each of these classes and create a method that prints the salary for each job Create a working object Use dynamic_cast Use typeid Create an object for each job that it will include the number of employees of that type and the method of printing these numbers
In: Computer Science
1. Design a class based on a modified Customer Structure. Use private and public definitions.
2. Create class methods (Setters and Getters) that load the data values. The Setter methods will validate the input data based on the criteria below and load the data into the class if valid.
For character arrays, the data must be within the specified data size. (See #3 below)
For zipCode, the number must be between 0 and 99999.
City and State need to be converted and stored in uppercase.
To get started loading the c-strings.
Getters
The book does not seem to provide a good example of what a (getter) method that returns a char array should look like. Section 9.9 is very close but uses string as examples instead of c-strings.
The best approach is to return a pointer to the c-string- Described as below:
char* getName(); // declaration - also known as prototype
// Customer is my Class name
char* Customer::getName() { // defined member function - Return a pointer to the c-string return name; }
cout << YOUR_INSTANCE_HERE.getName() << endl;
Setters
As for creating a setter method - you can define unsized char arrays in the method header
bool Customer::setName(char inputName[]) {
// code here..
}
3. Write a program that will allow me to enter data for the class and create and call a method that displays the data for the class.
During the input process, pass the input data to the setter method and confirm that the data entered is valid based on the class method return value. If not valid,prompt for me to re-enter the data until it does pass the class method's validation.(A do-while loop works well for this situation) I only need to enter the data for 1 instance of the class. The best way to do this is for the setter methods to return bool instead of void. If the data is valid, return true. Otherwise return false.
There is no need to loop for multiple instances of the object. Do not use cin statements inside the class method definitions.
Below is the original structure to use to create your class definition.
const int NAME_SIZE = 20;
const int STREET_SIZE = 30;
const int CITY_SIZE = 20;
const int STATE_CODE_SIZE = 3;
struct Customer { long customerNumber; char name[NAME_SIZE]; char streetAddress_1[STREET_SIZE]; char streetAddress_2[STREET_SIZE]; char city[CITY_SIZE]; char state[STATE_CODE_SIZE]; int zipCode;
};
Hints: The const variables need to be defined outside of the class definition.
All access to the data in the class must use public methods that you define. DO NOT DIRECTLY ACCESS the customer data items.
The class level input methods should return a boolean to confirm the data was loaded and passed any size or data ranges. The customerNumber setter does not need to return a value - It can be a void setter.
Set the customerNumber to 1 via the code - not user input. There is no input loop so only 1 set of customer's data is to be entered.
In: Computer Science
Write a python program to evaluate polynomials in general and test it on the following polynomial: ? 4 − 3? 3 − 39? 2 + 47? + 90 = 0
a) Develop and test a function named polyCalc() that evaluates a polynomial at a given value of the variable. The function receives two arguments: a list of the polynomial coefficients, and the value of the variable. It returns the result of the evaluation as a float. Use your function to evaluate the polynomial at ? = -5.4, -5.2, -1.2, -1.0, 2.0, 2.2, 7.2 and 7.4. What do you conclude about the solutions to the equation above?
b) Write a second function named polySolve() that seeks a solution of the polynomial between two values of the variable where the function has changed sign. This function should receive the list of coefficients, the two values of the variable between which there is a solution. It should return the value of the variable at which a solution was found. This function may be based on an exhaustive search, a bisection search, or on Newton-Raphson’s method. Select a method with some justification.
In: Computer Science
In: Computer Science
Write 3 detailed samples of scary text-based computer games. The location of your game could be a place that truly exists (possibly include research). Exclude graphic content. Remember to give choices to the player during the game.
In: Computer Science
This program will determine the letter grade for a student. It will ask for scores (could be labs, activities, quizzes, or projects) and then display some basic statistics derived from the scores.
In Python, Write a program that continuously asks for a non-negative score until the user enters -1. IF the user enters a valid score ask for the possible score for that assignment, we will not assume all scores will have the same maximum value. We will assume that no one will receive a score of 0 on any assignment IF anything it is actually turned in, meaning a score of 0 indicates that the score was not turned it. It’s still the score for the assignment, but this fact will be used later in the assignment. Once all of the scores have been entered display the following information:
• Total number of scores entered. • Total points for the student. • Total number of possible points • Class percentage, with 2 decimal place. • Letter grade using the 90, 80, 70, 60 grading scale. • If we believe the student has dropped. We will assume this is true if ALL of the entered scores are 0 (indicating that nothing was turned it). • If all of the scores were turned in or if the student is missing at least one score
In: Computer Science
Provide a number of examples(both positive and negative) that indicate the impact of software on our society?
In: Computer Science
I WANT THIS CODE TO BE SIMPLE BECAUSE I AM NEW TO CODING AND I WANT TO KNOW THE DETAILS! straight C Program. write a quiz game where a number of questions are asked and the user will win each time he answers right. and he loses each time he answers wrong.
the type of questions asked can be about sports or anything else. You can put 5 quiz questions.
It should only include the following: #include <stdio.h> and #include <stdlib.h>
because it is a simple code.
In: Computer Science
Software vulnerabilities in cyberspace can range from the simple outdated security patches on national critical infrastructure systems to poorly designed defense missile control systems. When these industrial control systems, military weapon control systems, or air control transportation systems are designed without security built into the software, their security vulnerabilities are paramount to the national security, economy, and human health.
Do research on the latest prominent software vulnerabilities and share your literature review findings with the class.
In: Computer Science
In: Computer Science
how to read a csv file in php not using fgetscsv or fgets. Just using file("Stores.csv"); or fopen("Stores.csv", "r"); and making into a html table? It print but it keeps saying Notice: Undefined offset: , Notice: Undefined offset: 2, etc at the top.
Acme,Walmart,Ross,BJs,Target,Marshalls,Foot Locker,Giant,Charming Charlie
142,160,28,10,5,3,60,0.28,3167
175,180,18,8,4,1,12,0.43,4033
129,132,13,6,3,1,41,0.33,1471
138,140,17,7,3,1,22,0.46,3204
232,240,25,8,4,3,5,2.05,3613
135,140,18,7,4,3,9,0.57,3028
150,160,20,8,4,3,18,4.00,3131
207,225,22,8,4,2,16,2.22,5158
271,285,30,10,5,2,30,0.53,5702
89,90,10,5,3,1,43,0.30,2054
153,157,22,8,3,3,18,0.38,4127
87,90,16,7,3,1,50,0.65,1445
234,238,25,8,4,2,2,1.61,2087
106,116,20,8,4,1,13,0.22,2818
175,180,22,8,4,2,15,2.06,3917
165,170,17,8,4,2,33,0.46,2220
166,170,23,9,4,2,37,0.27,3498
136,140,19,7,3,1,22,0.63,3607
148,160,17,7,3,2,13,0.36,3648
151,153,19,8,4,2,24,0.34,3561
180,190,24,9,4,2,10,1.55,4681
293,305,26,8,4,3,6,0.46,7088
167,170,20,9,4,2,46,0.46,3482
190,193,22,9,5,2,37,0.48,3920
184,190,21,9,5,2,27,1.30,4162
157,165,20,8,4,2,7,0.30,3785
110,115,16,8,4,1,26,0.29,3103
135,145,18,7,4,1,35,0.43,3363
567,625,64,11,4,4,4,0.85,12192
180,185,20,8,4,2,11,1.00,3831
183,188,17,7,3,2,16,3.00,3564
185,193,20,9,3,2,56,6.49,3765
152,155,17,8,4,1,33,0.70,3361
148,153,13,6,3,2,22,0.39,3950
152,159,15,7,3,1,25,0.59,3055
146,150,16,7,3,1,31,0.36,2950
170,190,24,10,3,2,33,0.57,3346
127,130,20,8,4,1,65,0.40,3334
265,270,36,10,6,3,33,1.20,5853
157,163,18,8,4,2,12,1.13,3982
128,135,17,9,4,1,25,0.52,3374
110,120,15,8,4,2,11,0.59,3119
123,130,18,8,4,2,43,0.39,3268
212,230,39,12,5,3,202,4.29,3648
145,145,18,8,4,2,44,0.22,2783
129,135,10,6,3,1,15,1.00,2438
143,145,21,7,4,2,10,1.20,3529
247,252,29,9,4,2,4,1.25,4626
111,120,15,8,3,1,97,1.11,3205
133,145,26,7,3,1,42,0.36,3059
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- title for web page -->
<title>Stores</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Stores</h1>
<table>
<?php
$Stores = file("homes.csv");
foreach($Stores as $key => $data) {
$Stores[$key] = explode(",", $data);
}
foreach($Stores as $key => $data)
print "".$Homes[$key][0]. "";
print "".$Homes[$key][1]. "";
print "".$Homes[$key][2]. "";
print "".$Homes[$key][3]. "";
print "".$Homes[$key][4]. "";
print "".$Homes[$key][5]. "";
print "".$Homes[$key][6]. "";
print "".$Homes[$key][7]. "";
print "".$Homes[$key][8]. "";
print "";
}
print "";
?>
In: Computer Science
Discuss an IT-related system that could be adopted at AIT to eliminate impersonation during exams, indicating where it would be located/placed and how each component of the system functions. .
In: Computer Science
What are the most effective problem-solving techniques available to software engineers today, and how do they facilitate the software engineering process? Please provide examples and explain who the main stakeholders are and what their responsibilities in the software engineering process are.
In: Computer Science
Discuss the content (type of data and files) of a database which could be useful at Accra Institute Technology(AIT).
In: Computer Science