Principles of programming with c++

Assignment Help C/C++ Programming
Reference no: EM13855048

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

Reference no: EM13855048

Questions Cloud

Critique the trends and issues in union membership : Address the following in your presentation: Critique the trends and issues in union membership that have led to the decrease of a represented workforce. Recommend the beginnings of a strategic plan that reduces the desire of workers to unionize
What can bjc do to secure daimlerchryslers commitment : What can be done to make this type of organization more effective? Should DaimlerChrysler focus more resources toward BJC? What can BJC do to secure DaimlerChrysler's commitment?
Medicaid expansion and the affordable care act : "Medicaid Expansion and the Affordable Care Act" Please respond to the following: Read the Senate Bill HB 707 for the state of Georgia. You may also view the article athttp://www.legis.ga.gov/Legislation/20132014/143506.pdf
Financial system and the essential documents : Scenario: You have recently been hired as a manager in the financial department for a local hospital. In the last few weeks, you have noticed a lack of understanding from the staff on the hospital financial system. In order to connect the situatio..
Principles of programming with c++ : 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.
Choose ten different public policy issues : Choose ten different public policy issues from both the domestic policy (choose 5) and foreign policy spheres (choose another 5) and explain the differences between the parties (if any). If there is no difference in the policy issues you choose, expl..
Explain the human resource management process : Explain the human resource management process, its role in supporting the overall organizational strategies, and the various functions involved in human resource management
What good services does the business provide : What good services does this business provide? And to what market (s)? What is its basis for competing? How does it make profit or contribute to a society?
Prepare the amortization schedule for the loan : Calculate the monthly payment required if Bill agrees to the sticker price of $25,000 and finances the car at 2% per year and prepare the amortization schedule for the loan using an Excel spreadsheet.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Design and implement a dynamic doubly linked list

Design and implement a dynamic doubly linked list - Allocate and de-allocate memory at runtime - Analyze a basic set of requirements for a problem

  Performs a merge sort on 2 number sequences

Write a C program Sort.c that performs a merge sort on 2 number sequences produced by the program in Q1. Sort.c should spawn 2 processes and each of the children processes would exec() the Gen program to produce a sequence.

  Loop statments

Weekly tasks or assignments (Individual or Group Projects) will be due by Monday, and late submissions will be assigned a late penalty in accordance with the late penalty policy found in the syllabus.

  Flipflaps - game based on pancake sorting

The project is to design and write a C++ 11/FLTK game program with a graphical user interface.The game is based on "pancake sorting,", which actually has some mathematical significance.

  Write a pseudocode statement

Assume that a program has two string variables named str1 and str2. Write a pseudocode statement that assigns an all uppercase version of str1 to the str2 variable. is str.add(str1,str2) part of it?

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Integer arguments representing feet

A constructor that will take a single integer argument representing a whole number of feet • A constructor that will take two integer arguments representing feet and inches respectively • A constructor that will take three integer arguments represent..

  Implement recursive algorithms using a stack

Show the difficulties of the added complexity and which of the two sorts is easier to implement nonrecursively? Why?

  Class mail order

Set up one one-dimensional array for each field: product number (integer), unit price (double), and current inventory level (integer) in main memory to hold the above product information. There should be five rows (0 to 4) in each array, one for e..

  Write a program to open a file for reading

Write a program to open a file for reading that has twenty (20) rows and in each row there are three (3) columns.

  Write a main function that reads pairs of positive integers

Prepare a function that has two positive integer parameters (say high and low) that returns the number of powers of two between (but not equal to) those parameters.

  Write a program that will read input and write it back out

Write a program that will read input, and write it back out, character by character. Propend each line of input with a line number.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd