Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

1 Instructions

You may work in pairs (that is, as a group of two) with a partner on this lab project if you wish or you may work alone. If you work
with a partner, only submit one lab project with both of your names in the source code file to Blackboard for grading; you will each
earn the same number of points. What to hand in, and by when, is discussed in Section 5; read it.

2 Lab Objectives

After completing this assignment the student should be able to:

? Complete all of the objectives of the previous lab projects.
? Write function definitions, call functions, pass parameters, define local variables.
? Open a text file for reading/writing and read/write strings and numbers from/to the text file.

3 Prelab Exercises

? First, skip to Section 4 and read the lab project software requirements. Then come back here.
? Create a new Code::Blocks C++ project named Lab05.
? Navigate to the course website and download the Lab05.cpp file. This file is a template containing most of the code for the lab project, but in various places, the code has not been completed. Your job shall be to complete the code by reading the comments and writing proper C++ code in the locations indicated by ??? symbols. Follow the instruction in Steps 28 through 32 of the Code::Blocks tutorial1 to add Lab05.cpp to your Code::Blocks project.
? Navigate to the course website and download the stats-season.txt file. This program will read input data from this file and will
write data to an output file named stats-game.txt. Copy stats-season.txt to your Code::Blocks Lab05 project folder. For example,
when you created your Lab05 project, if you specified C:\cse100\Lab05 as the project folder, then copy stats-season.txt to
C:\cse100\Lab05.
? When you run your program, you will see the output window appear, but nothing of substance will be displayed in it. This is because the output is being sent to the output file named stats-game.txt rather than to the output window. To know if your program worked correctly, you need to open the output file and examine its contents. Click File | Open on the main menu. In the Open dialog, navigate to your project directory C:\cse100\Lab05 where you should see a file named stats-game or possibly stats-game.txt. Click on that file name and then click the Open button. Verify the output file contains the correct contents.

4 Lab Exercise

A text file named stats-season.txt contains season statistics for a basketball team, e.g.,

Name GP FGM FGA FTM FTA 3M 3A PTS REB
F.Flintstone 23 88 190 50 82 27 74 253 100
B.Rubble 23 85 212 45 53 24 84 239 94
W.Flintstone 14 56 101 29 46 0 1 141 82
H.Simpson 23 77 118 62 107 1 3 216 143
N.Flanders 23 57 127 15 17 37 91 166 51
N.Explosion 23 53 109 9 14 46 95 161 63
K.Broflovski 21 31 100 57 79 8 29 127 38
E.Cartman 18 28 66 10 12 17 37 83 22
G.Jetson 17 26 58 19 29 3 16 74 37
S.Skwigelf 18 19 43 18 25 3 9 59 20
T.Wartooth 22 19 59 23 40 7 23 68 46

Where the contents of each column is,
Name The players name, formatted as I.s where I is the initial of the player's first name and s is the player's surname.
GP Games played.
FGM Field goals made.
FGA Field goals attempted.
FTM Free throws made.
FTA Free throws attempted.
3M Three point field goals made.
3A Thee point field goals attempted.
PTS Points (the total points scored in the season).
REB Rebounds.


Attachment:- Assignment.pdf

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M91424803
  • Price:- $15

Priced at Now at $15, Verified Solution

Have any Question?


Related Questions in C/C++

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As