Class Name = CSC 101 A+ 5) A 7)******* A- 2) ** B+ 2) ** B 1) B 3) C+ (0) C ( 1) C-(2) D( 0) F ( 1) ** grade.txt CSC-100 А+ А+ с- F А А А А- А- В+ В+ В- В- С С- А+ А+ А+ А В- A
Q: c++ (A) write the definition of the Circle class. (B) Write a test program implementing the…
A: Hello student. Warm welcome from my side. Hope you are doing great. I will try my best to answer…
Q: for (int i-2; i>=3; ) cout<<*: for (char i='c'; i<'f; i++) cout<<i; cout<<i; int i, j: for (i= 1; i…
A: lets analyse the given codes for output: for(int i=2;i>=3;)//here i is intialized to 2, loop…
Q: Transcribed Image Text 7-a) Danish works as a constructor. Like all constructors, he is also a beer…
A:
Q: 3.27 LAB: Login name Write a program that creates a login name for a user, given the user's first…
A: The answer is given below.
Q: Given the following code and output: int a[] = {10, 20, 30, 40}; cout << a << endl; Example Output…
A: Please find the answer to the above question below:
Q: C++ class progran enter u subj'ects. write C++ 6 student each has 4 tryits do the fallawing tlo…
A: Write C++ program for 6 student each having 4 subjects Answer: #include <iostream>#include…
Q: Huge Integers Design a class that can handle arbitrarily large integers (using strings) that…
A: The following program illustrates how to design a custom class of new data type LargeInt using…
Q: 8. You live in a village. The village can be represented as a line that contains n grids. Each grid…
A: C code with output provided below:
Q: 7.12 LAB: Warm up: Parsing strings Prompt the user for a string that contains two strings…
A: Coded using Python 3.
Q: An acronym is a word formed from the initial letters of words in a set phrase. Write a program whose…
A: Logic: Accept input string from the user. Check the first character if it is upper case character…
Q: Question No. 2 Write a program that takes…
A: Given: Write a program that takes input values as integer, checks the number is not less than 10…
Q: O 88 h Money h Money ) No Selection 1 #ifndef MONEY_H 2 #define MONEY_H 3 #include 4 using…
A: Object oriented programming contains various features like class and objects, inheritance,…
Q: 4.17 (Gas Mileage) Drivers are concerned with the mileage their automobiles get. One driver has kept…
A: As the inputs are integers, we can use the sentinel condition as inputs are non positive
Q: 1 #include using namespace std; 4 5 typedef char box[4][8]; 7 int main() { box b[3][2]; cout<<sizeof…
A: OUTPUT:
Q: SORU 3. (QUESTION 3.) 1 #include using namespaces std; 3 intmain() 4日{ flaot a=6,b=8,c=4,…
A: GIVEN:
Q: Plese filx this program #include #include class fibo { private long int fo, fl, fib;…
A: Required: to fix the given program: #include<iostream.h> #include<conio.h> class fibo {…
Q: Problem For this project, you will use the Fraction class I have given you (Fraction.h and…
A: #include <iostream>#include "Fraction.h"using namespace std; int main(){ int ch;…
Q: How many times are the following loop bodies repeated? What is the printout of each loop?
A: Given: How many times are the following loop bodies repeated? What is the printout of each loop?
Q: Part A #include #include main() #include #include main () int X[7]={2,5,1,3,6,9,7}, S=0; for (int…
A: Given: required: output of the code
Q: in c++ i need to make it where the the code skips over the leading blanks in the string for example…
A: Kindly explain the code what you actually want
Q: Create a class “Student” with data members such as roll number, name and branch. Create another…
A: A class Student has been created which takes Roll number, name, and branch as input. The source code…
Q: struct ID { int x; int y; }; struct name { ID r; }; int main() { name a[2]; for (int i=0;i<2;i++) {…
A: Given code is struct ID { int x; int y; }; struct name {ID r; }; int main() { name a[2]; for(int…
Q: a) b) C) d) CO 1 123 2 4 5 6 7 8 9 10 11 12 20 19 TELE 345 13 #include #include int main(){ 14 15…
A:
Q: Bulgarian solitaire def bulgarian_solitaire(piles, k): You are given a row of piles of pebbles,…
A:
Q: for(int 1 = 0; 1 < 5; i++){ for(int j = 0; j < 5; j++){ cout << (i + j) % 2; } cout << endl; }
A: Task : Given the code segment. The task is to find the output of the code.
Q: 8. You live in a village. The village can be represented as a line that contains n grids. Each grid…
A: Each person can reach 1 grid. People can only access their homes. Note that HB.BH also works. Each…
Q: { int i= 10; While (i< 50) { cout <<i; i+ = 5 ; }
A: Answer : Given program is in c++ and it start from a variable i = 10 . and it will goes till 49 less…
Q: int a=6; int s-%3; while(a>10) S=s+a; cout<<"a="<<a<<endl; a+=23; cout<<"a="<<a; A) a=8 b=6 B. a=6…
A: Given : int a=6; int s=0; while(a>10) { s=s+a; cout<<"a="…
Q: Hinclude Hinclude ciomanip> using namespace std; void test(int first, int& second); int main () int…
A: The output is below:
Q: 3) The number of errors in the following code is .. #include using namespace std; int main) int a,…
A: Answer: The correct option of the code is (d) = 0 Code: #include <iostream>using namespace…
Q: int sum = (int)33.9%3B The above statement is an example for O a. Explicit Casting Ob Type Filtering…
A: - We need to highlight the correct option--out of the provided ones for the statement. - The…
Q: 15. The statement A: p implies (not p) implies q) is O Tonly when p =T O none of these O always T O…
A: Answer: A: p implies ((not p) implies q) p->(~p ->q): Explanation: p q ~p ~p ->q…
Q: 1. Refactor the following code for encapsulation (information hiding). (5 points) FILL IN BLANKS on…
A: public class School { private String name; private String id; public String getName() { return…
Q: This program calculates the total number of left-handed and right-handed //…
A: #include<iostream> using namespace std; int main(){ string leftOrRight = ""; // L or R for…
Q: void minimum (int i1, int i2) { if (i1 > n >> m; minimum (n, m); return 0; }
A: .file "p.cpp" .text .section .rdata,"dr" _ZStL19piecewise_construct:…
Q: 7 #include #include using namespace std; int val (char c) 11 E { 8 9 10 if (c >= '0' && c = 'A' &&…
A: This is c code written in C++ form
Q: (2) Let P (x, y) : x plays in y." A(x): x is athletic." S(x) :x is smart." E(y) : y is in English…
A: Given: Let P (x, y): x plays in y. A(x): x is athletic." S(x) : x is smart." E(y): y is in…
Q: Equation Slope (-a / b) Is point (5, -2) on the line? 5x+ 4y - 17 - 0 -5/4--1.25 Yes, because 5(5) +…
A: Source Code: APLine.java: public class APLine { private int a; private int b;…
Q: Modify class Point to represent points in 3D instead of 2D.
A: In 3D, the dimensions are x, y, z So, we have to add data member for z-dimension
Q: Help Me With C Programming. At Lili's birthday party, there is a game arranged by Jojo as the host.…
A: I have implemented the given requirements as per the specification. Comments are mentioned for…
Q: After generating rectangles of arbitrary size on a two-dimensional plane, write a program to find…
A: 1. After generating rectangles of arbitrary size on a two-dimensional plane, write a program to find…
Q: mplement a class CreditCard. A CreditCard is defined by a 16-digit number and an expiration date. A…
A: Lets see the solution.
Q: (2) Let P(r, y) : a plays in y." A(r) : r is athletic." S(r) : a is smart." E(y) : y is in English…
A: 1) Here the statement holds true for some player . Thus we need to use existential quantifier…
Q: int i 0; = while (i < 10) { cout << i << endl; i=i+2; }
A: I HAVE PROVIDED SOLUTION IN STEP2
Q: An acronym is a word formed from the initial letters of words in a set phrase. Write a program whose…
A: p[o] means first latter of every word split method convert sentence in to word like this so now we…
Q: // LeftOrRight.cpp - This program calculates the total number of left-handed and right-handed //…
A: #include <iostream>#include <string>using namespace std;int main(){ string…
Q: C++(OOP) Write a program that implements the following situation. A marketing organization ABC Ltd…
A: Given: C++(OOP)Write a program that implements the following situation.A marketing organization ABC…
Q: #include #include #include #define p prin #define c cprin #define s scanf #define g goto #include…
A: The error is: 1.#include <conio The correct statement is : #include <conio.h>…
Q: 3. Smart Numbers language C++ G autocomplete.ready O 1 > #include -- A number is called a smart…
A: I have provided c++ code for given question below.
Q: R7.30Assuming the following declarations, find the mistakes in the statements below. struct A { int…
A: a) b[0].a2 is of type A* but it's trying to assign a(of type A) to it, trying to make assignment…
How to write a java
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- 1. After generating rectangles of arbitrary size on a two-dimensional plane, write a program to find the following and show the result. (1) Structure rectangle member composition: center position (x,y), width, height (2) Existence range of rectangle: 0 to 100 in x and y directions (3) Rectangle size: 20≤w,h≤50 (4) Write a program that randomly generates 10 squares and finds Intersection over Union (IoU) between different squares. (Let the two squares be A and B, IoU(A, B) = ?∩?/?∪?) (5) Write the following functions: (a) A function that fills the contents of the structure (b) A function that calculates the IoU of two given rectangles (c) A function that displays the contents of the final structure (d) Other functions necessary for writing programs (6) IoU results between squares are output in the form of 10 X 10 C++ Program source (submit only .c or .cpp)In C++ Declare a constant “ SIZE = 5 ” Declare an array of ints , of size SIZE . Initialize that array to have the values 10, 12, 15, 19, 6 . – Write a loop that calculates and prints out the minimum value of the array. – Write a loop that calculates and prints out the maximum value of the array. – Write a loop that calculates and prints out the average value of the array.JAVA LANGUAGE Body Mass Index Version 2.0 by CodeChum Admin Recall that according to the National Heart, Lung, and Blood Institute of the National Institutes of Health, body mass index (BMI) is a measure of body fat based on height and weight that applies to adult men and women. It is used to monitor one's health by determining whether one is underweight, overweight, has normal weight or is obese. It is computed based as follows (when using standard weight in pounds and height in inches): BMI = 703 x (weight/(height2)) Furthermore, people with BMI scores that are less than 18.5 are said to be underweight. Those with scores between 18.5–24.9 (inclusive) are of normal weight. Those with scores between 25–29.9 (inclusive) are said to be overweight. And those with scores 30 or higher are obese. Input The input is composed of two positive integers representing the weight in pounds and the height in inches. 140·65 Output A single line containing two values: the computed…
- CIS 2275 C++ Programming Part I Program 6 Trivia Game In this program, create a simple trivia game for two players. It will work like this: Starting with player 1, each player gets a turn at answering five trivia questions. There are a total of 10 questions. When a question is displayed, four possible answers are also displayed. Only one of the answers is correct, and if the player selects the correct answer, they earn a point. After the answers have been selected for all of the questions, the program displays the number of points earned by each player and declare the player with the highest number of points to be the winner. The players will have the option of playing another round. The flow of the program will be: 1. Show the Header information. 2. Create an array of Question structs. 3. Read the questions from the text file. 4. If the questions were properly read, start a do-while loop. 5. Declare and initialize: a. playerOnePoints and playerTwoPoints b. questionNumber…CIS 2275 C++ Programming Part I Program 6 Trivia Game In this program, create a simple trivia game for two players. It will work like this: Starting with player 1, each player gets a turn at answering five trivia questions. There are a total of 10 questions. When a question is displayed, four possible answers are also displayed. Only one of the answers is correct, and if the player selects the correct answer, they earn a point. After the answers have been selected for all of the questions, the program displays the number of points earned by each player and declare the player with the highest number of points to be the winner. The players will have the option of playing another round. The flow of the program will be: Show the Header information. Create an array of Question structs. Read the questions from the text file. If the questions were properly read, start a do-while loop. Declare and initialize: playerOnePoints and playerTwoPoints questionNumber start a while loop - while…Create a grading program in C as follows.- Ask the user for the number of students and store it in an integer variable.- Create an array of floats with four rows and columns equal to the number of students storedearlier.- Initialize the array to zeros.Create a menu with the following options (use a do-while loop and repeatedly display the menu):A or a to add student info one student at a timeT or t to display class average for homeworkS or s to display class average for quizzesB or b to display class average for examsZ or z to exit program (program repeats until this exit command is entered)The information for each student is: student number, homeworks grade, quizzes grade, and examsgrade.
- Number system is base 10, because it strings together the digits 0 – 9 to form any whole number (there is a 1’s place, a 10’s place, a 10-squared’s place, etc). Hexadecimal numbers are written in base 16. This means they string together the digits 0 – 9 and the letters A – F to form any whole number (there is a 1’s place, a 16’s place, a 16-squared’s place, etc). For example, BD3C8 and 305A2 are two different 5-digit hexadecimal numbers. How many 9-digit hexadecimal numbers are there that have exactly 4 zeroes. (Note: Hexadecimal numbers, like our normal base 10 numbers, cannot start with a 0).C++ Create a class Student that contains three members: roll no, name and mark, and three functions. Write a first inputStudent() function to get data of student class. Write a second getMark() function that returns a student’s mark. Write a third display() function that displays a student’s data. In a main() function, you need to declare 40 students and get data of all students by using inputStudent() function. And also use a pointer array to keep all students by mark greater than 50 and display the searching data of each student in that pointer array (Use the access operator -> to access a pointer points to member functions of the Student class).1-Convert the code below to OOP (Class) 2-give a detail explanation of the code #include <iostream> #include <cmath> #define boardSize 15 #define boardWidth 50 // put into grid the count no of # from x,y void putBlock(char grid[boardSize][boardWidth], int x, int y, int count) { for (int i = 0; i < count; i++) grid[x][y + i] = '#'; } // put into grid the count no of space from x,y void putSpace(char grid[boardSize][boardWidth], int x, int y, int count) { for (int i = 0; i < count; i++) if (grid[x][y + i] != '#') grid[x][y + i] = ' '; } void putCircle(char grid[boardSize][boardWidth], int x, int y) { // line 1 putSpace(grid, x, y, 3); putBlock(grid, x, y + 3, 5); // line 2 putSpace(grid, x + 1, y, 1); putBlock(grid, x + 1, y + 1, 2); putSpace(grid, x + 1, y + 3, 5); putBlock(grid, x + 1, y + 8, 2); // line 3 putBlock(grid, x + 2, y, 1); putSpace(grid, x + 2, y + 1, 9);…
- In C write a grading program as follows.- Ask the user for the number of students and store it in an integer variable.- Create an array of floats with four rows and columns equal to the number of students storedearlier.- Initialize the array to zeros.Create a menu with the following options (use a do-while loop and repeatedly display the menu):A or a to add student info one student at a timeT or t to display class average for homeworkS or s to display class average for quizzesB or b to display class average for examsZ or z to exit program (program repeats until this exit command is entered)(Coding Language C++) Dynamic Programs Hoskins College offers both curriculum and continuing education courses. Write a program that dynamically tracks these courses using an array of object pointers. Every course (both curriculum and continuing education) has a course id, title, room number, and number of contact hours. A curriculum course has credit hours and tuition rate. Tuition is calculated by multiplying the course's credit hours by tuition rate. A continuing education course has a flat fee (cost). Implement a show() function in every class that displays the data in the object. Part A: Create an inheritance-based collection of classes to represent these different courses. Include code in main to test your work by instantiating objects of the two derived classes. Part B: Modify your program. Remove the objects you created in main to test the classes. Modify the base class so that show() becomes a virtual class. In main, create a single array capable of holding pointers to…Create union floating point with members float f, double d and long double x. Write a program that inputs values of type float, double and long double and stores the values in union variables of type union floating point. Each union variable should be printed as a float, a double and a long double. Kindly check if the values always print correctly?