Question

In: Computer Science

C++ Project Organization Create a project called Project1 and then name and organize the following programs...

C++

Project Organization

Create a project called Project1 and then name and organize the following programs under it.

Part 1 CircleArea

You are going to write a program to compute and output the area of a circle with a radius of 2.5.

Think through what you need to do:

Create a variable for radius

set it to 2.5

Create a variable for area

set it to 3.14159 * radius * radius

output the value of area

Challenge (not required)

Generalize this so that you can input any radius and the program will output the area for it.

Part 2 TicTacShmoe

Write a program that prints out three different tic tac toe winning results. Make each one bigger than the last, separated by more spaces and lines:

1 0 0

0 1 0

0 0 1

0 0 1

0 1 0

1 0 0

The goal is to give you practice with the cout statements in C++

Part 3 TriangleArea

Write a program called TriangleArea, which calculates and outputs the Area of a triangle with a Base value of 3.5 and a Height value of 4.85. The formula for the area of a triangle is: 1/2 ×???? × ????ℎ?.

Your program should output correct answer.

Part 4 MilesToKilometers

Write a program that will tell me the conversion of 60 miles, into kilometers. Remember that 1 mile is 1.60934 kilometers.

Part 5 MyInitials

Write a sequence of cout statements to display your initials (2 – 3 letters) using a cool pattern for each letter.

>My Initial is BL

For example, here is a simple pattern for the initials IL:

II LL

II LL

II LL

II LL

II LL

II LL

II LL

II LL LL LL LL

Use around 8 cout statements to complete this exercise.

Part 6 DoubleUp

Write a program that ask the user to input a number. Then tell them, What double up is. For example, if the user inputs a 7, the program should output ~Double up is 14~

Solutions

Expert Solution

Following are the codes and there outputs of the project Project1:-

(1.) The C++ code for the first part is as follows:-

The output of the above code is as follows:-

(2.) The C++ code for the second part is as follows:-

The output of the above code is as follows:-

1 0 0
0 1 0
0 0 1
1 1 1 1
0 0 0 0
0 0 0 0
0 0 0 0   
0 1 0 0 0
0 1 0 0 0
0 1 0 0 0
0 1 0 0 0
0 1 0 0 0

(3.) The C++ code of the third part is as follows:-

The output of the above code is as follows:-

(4.) The C++ code for the fourth part is as follows:-

The output of the above code is as follows:-

(5). The C++ code of the fifth part is as follows:-

The output of the above code is as follows:-

Enter initial MR
MM RR
MM RR
MM RR
MM RR
MM RR
MM RR
MM RR
MM RR RR RR RR

(6.) The C++ code of the sixth part is as follows:-

The output of the above code is as follows:-


Related Solutions

Complete the following. Describe how to a) establish, b) create, and c) organize project requirements. Explain...
Complete the following. Describe how to a) establish, b) create, and c) organize project requirements. Explain how to locate and identify a) sources of supply, b) suppliers, c) market places, and d) competition.
Create a C# console application (do not create a .NET CORE project) and name the project....
Create a C# console application (do not create a .NET CORE project) and name the project. Generate two random integers, each between 1 and 50, that you will be adding together to test the user's ability to perform the addition operator. Display the numbers in the console, such as:             7 + 22 = ? Once the user provides their answer, check to see if it is correct and if not, tell them sorry, please try again. If their answer...
Create a C# console application (do not create a .NET CORE project) and name the project...
Create a C# console application (do not create a .NET CORE project) and name the project TuitionIncrease. The college charges a full-time student $12,000 in tuition per semester. It has been announced that there will be a tuition increase by 5% each year for the next 7 years. Your application should display the projected semester tuition amount for the next 7 years in the console window in the following format:             The tuition after year 1 will be $12,600. Note:...
Create a C# console application (do not create a .NET CORE project) and name the project...
Create a C# console application (do not create a .NET CORE project) and name the project TimeToBurn. Running on a particular treadmill, you burn 3.9 calories per minute. Ask the user how many calories they wish to burn in this workout session (this is their goal). Once they tell you, output on the console after each minute, how many calories they have burned (e.g. After 1 minute, you have burned 3.9 calories). Keep outputting the total amount of calories they...
Create a structure in C called BarcelonaPlayer with the following members. struct BarcelonaPlayer { char name[20];...
Create a structure in C called BarcelonaPlayer with the following members. struct BarcelonaPlayer { char name[20]; int age; char country[20]; char Position[20]; double Salary; double Rating; }; First, create an array of BarcelonaPlayer structures. Now, write a function that takes an array of BarcelonaPlayer structures as input and find out the highest paid player among all the players. void highestPaidPlayer(struct BarcelonaPlayer *pl, int size); Create another function that finds all the players from Argentina. void findPlayers(struct BarcelonaPlayer *pl, int size);
Write a C++ programs to: 1. Create a class called Student with four (4) private member...
Write a C++ programs to: 1. Create a class called Student with four (4) private member variables, name (string), quiz, midterm, final (all double type); 2. Include all necessary member functions for this class (at least 1 constructor, 1 get function, and 1 grading function – see #6); 3. Declare three (3) objects of Student type (individual or array); 4. Read from the keyboard three (3) sets of values of name, quiz, midterm, final and assign them to each object;...
This project requires the student to create a record (in C++ called a struct). The record...
This project requires the student to create a record (in C++ called a struct). The record should contain several fields of different data types and should allow the user to search the records to find the student with the highest grade. In this project the student should gain an understanding of the nature of records with multiple data types, how to save the records, search the records and retrieve them.  The special problems of maintaining records of multiple data types on...
Problem 1 Create a new project called Lab7 Create a class in that project called ListORama...
Problem 1 Create a new project called Lab7 Create a class in that project called ListORama Write a static method in that class called makeLists that takes no parameters and returns no value In makeLists, create an ArrayList object called avengers that can hold String objects. Problem 2 Add the following names to the avengers list, one at a time: Chris, Robert, Scarlett, Clark, Jeremy, Gwyneth, Mark Print the avengers object. You will notice that the contents are displayed in...
HW_6a - Read a text file Create a new C++ project and name it as:   Numbers...
HW_6a - Read a text file Create a new C++ project and name it as:   Numbers Create a text file and     save it as:   data.txt Create and save the file      in a C++ project      in the Resource folder. Enter the following numbers:        3                                                              4                                                              5       Note:   After you enter the 5, don’t press the enter key. Save and close the file. Add another file and name it:   Source.cpp Write one statement that declares a file...
In the root of the project create a folder called res. In that folder create a...
In the root of the project create a folder called res. In that folder create a file called DemoFile.txt Create a class with a static main that tests the ability to resolve and print a Path: Create an instance of a FileSystem class. Create an instance of the Path interface for the DemoFile.txt file. Print the constructed Path with System.out.println() method. Create a class that does the following: Using a pre-Java 7 solution, create a class that tests streams in...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT