In Racket, what is LION as defined? A) an instance of a movie B) an instance of compound data C) an instance of a data structure D) a value of type Movie E) All of the Above F) None of the Above (define-struct movie (title director length dvd?)) ; a Textbook is a (make-book String String Natural Boolean) ; interp: a movie where ; title is the movie’s title ; director is the name of the movies’s director ; length is the length of the movie in minutes ; dvd? is whether the movie is available in dvd format (if true)
Q: Suppose you want to remove extra spaces at the begnning or end of a string. Java has the trim()…
A: the program is an given below :
Q: required in C-programming sir! Suppose the university has decided to announce bonus 1 PMS point to…
A: Here we have to choose Structure datatype for defining UID, Employee Name and PMS Status. The…
Q: This expands the previous work to enable handling multiple employees. You will do this by…
A: #include <stdio.h> #include <stdlib.h> struct employees { char name[20]; int ssn[9]; int…
Q: [In c#] Write a class with name Arrays . This class has an array which should be initialized by…
A: using System; public class GFG { public static void Main() { int[] arr = { 1,…
Q: Write in C++ 1. Define a struct for a soccer player that stores their name, jersey number, and…
A: #include<iostream>#include<string>using namespace std; //struct for a soccer player that…
Q: Create a function that takes a single string as argument and returns an ordered array containing the…
A: In this problem we need to design a C# code. Please find the logic below that we will be used.…
Q: (Coding Language C++) Dynamic Programs Hoskins College offers both curriculum and continuing…
A: PART A: PROGRAM: //Header file #include <bits/stdc++.h> //Using namespace using namespace…
Q: C++ In this exercise, we learning the concept of abstract data type (ADT). Create a structure.…
A: The program is written in c++
Q: Modify the code fragment below from topic#16's activity so that it will introduce a pointer to…
A: Here, one C++ Program given with structure concept implemented in it. We have to modify the concept…
Q: Write a program for tic tac toe game in C programming language and during the writing the followed…
A: Program code: #include <stdio.h>#include<string.h>int fact(int);struct Distance{ int…
Q: You are working for a university to maintain a list of grades and some related statistics for a…
A: According to the information given:- We have to create c++ program to maintain a list of grades and…
Q: Computer Science I need a program written in C++, This program will read the words i entered, till…
A: I have provided C++ CODE along with CODE SCREENSHOT and also provided OUTPUT…
Q: I wanna help in this 2 OPERATOR using c++ . (This is the header of question) (Create a class…
A: C++ PROGRAM: #include <iostream>using namespace std;class IntegerSet{private:int set[ 101…
Q: Card Shuffling and Dealing (CH) o Create a program to shuffle and deal a deck of cards. o The…
A: Step 1:- Program Approach:- 1.Include header file 2.Create the class Card 3.Create the class…
Q: Write a program that reads Restaurant’s detail. It should also find and print the total number of…
A: syntax of struct in c struct <struct-name> { //attributes list with data type };
Q: The main method in C which calls all the above functions is: #include int main(){ int s1[100],…
A: Code: #include <stdio.h>#include <stdlib.h>typedef struct node *nodeptr;typedef struct…
Q: PROGRAM IN C ONLY!! (please don't use Bool or any data structures such as struct) Using the…
A: A C program for the given criteria is as follows, File name: “main.c” #include<stdio.h>…
Q: win WI
A: #include <stdio.h> struct student { char firstName[50]; int roll; float marks; }…
Q: FOR C++, PLASE SEND THE ANSER IN 30 MINUTES. ACCORDING TO CODE BELOW, #include "Vehicle.hh"…
A: Since the Vehicle class is not entirely given, we will make assumptions while writing down the code.…
Q: Assume pointer P points to object of class1 and pointer Q points to object of class2, one of the…
A: Assume pointer P points to object of class1 and pointer Q points to object of class2 one of the…
Q: Subtask I: Now that you can represent cards, you'll attempt to represent poker hands. Poker is one…
A: I have given the full classes with functions so it will be easier to understand and have also added…
Q: Using examples of code, explain how the enumerated type works, in terms of declaring the data type,…
A: Enumerated type is a user defined data type which can be assigned some limited values. These values…
Q: IN C++ NOTE: do not use classes or pointers for Lab 6 - Part B. You are only to use struct data to…
A: ANSWER:-
Q: Write A Program In C The Example : #include #include #define MONTHS_SIZE 12 #define DAYS_SIZE…
A: Program: #include<stdio.h> #include<ctype.h> #define MONTHS_SIZE 12 #define DAYS_SIZE 7…
Q: Question 10: Write a C++ program to store the performance of each player of the test match which has…
A: C++ Code for above : #include<iostream> using namespace std; //to store info. of each…
Q: Word Count Problem Consider that you have been hired to design in C++ the program that will count…
A: Given:
Q: Q6: Write a program in C++ that contains declares a student_t data structure and defines functions…
A: Required : C++ Program Information to be entered in student_t object. Print the student who obtained…
Q: Write a program that reads Restaurant.’s detail. It should also find and print the total number of…
A: #include<iostream>#include<string.h>using namespace std; struct CusType{ private:…
Q: A function can return a value of an enumeration type. True False
A: We need to choose if the given statement related to enumeration is true or not. The statement says…
Q: n c++ i have this struct struct Student { string firstName, lastName; int pointTotal;…
A: The question is to write C++ code in respect to the given condition.
Q: This expands the previous work to enable handling multiple employees. You will do this by…
A: #include <stdio.h> #include <stdlib.h> struct employees { char name[20]; int ssn[9]; int…
Q: (Modifying Class GradeBook) Modify class GradeBook (Figs. 16.11–16.12) as follows:a) Include a…
A: Coded using C++.
Q: Please help with this c++ problem Assignment 6 - Monkey Food In the Gaddis textbook read Chapter…
A: The Answer is in step-2.
Q: Code in C please. Write the code that defines a struct called pilot. The following information must…
A: Given: Write the code that defines a struct called pilot. Create struct (holds information about a…
Q: Q2: Write a C++ program in which a class has three data members: name, roll no, marks of Five…
A: Class is a user-defined data structure. The encapsulation of data members and members' functions…
Q: Question 1 is already done need help with the others though This is the C code I have so far…
A: Coded using C language.
Q: Write 0OP in C++program to create a class STUDENT string name, integer dgreel, integer dgree2,…
A: The classes and objects is along with its attributes and methods.
Q: Define a struct type to represent a university student with a name, surname, course, year. 2) Define…
A: As per our company guidelines, we are supposed to answer only 3 subparts of the question. Kindly,…
Q: I get an error saying a nonstatic member reference must be relative to a specific object for the…
A: error saying a nonstatic member reference must be relative to a specific object for the float…
Q: Question 10: Write a C++ program to store the performance of each player of the test match which has…
A: Use a structure to represent Player Each Team has 11 players So, declare an array of structures…
Q: Complete the program 'Bcast-Reduce-Assignment.c' (Refer to 'Bcast-Reduce-Example.c') to make the…
A: We need to insert missing items, to make the code execute.
Q: Q6: Write a program in C++ that contains declares a student t data structure and defines functions…
A: Start : 1) Declare structure name as student 2)Declare array of structure of size 5 3)Input data…
Q: Can I please get help writing this in C++ Write a class called Word that stores a word from a…
A: C++ is a powerful general-purpose programming language which can be used to develop operating…
Q: Question 1 is already done need help with the others though This is the C code I have so far…
A: Coded using C language.
Q: a. Define an enum type, flowerType, with the values ROSE, DAISY, CARNATION, FREESIA, GARDENIA,…
A: Enum is a user-defined data type in C++. It is used to ensure declared type must contain only…
Q: write a C ++ program that uses “class” to calculate ”Sets“. for example , calculate the union of…
A: Union: In set theory, the union is defined as the operation applied on two or more sets of elements…
Q: Q3: Write a C++ program with a class named search, the class has three member functions, one to full…
A: Task : Write a C++ program with class search having mentioned 3 methods . C++ program :-…
Q: An acronym is a word formed from the initial letters of words in a set phrase. Define a function…
A: Iterate over the given string character by character. The first character and the upper case…
In Racket, what is LION as defined?
A) an instance of a movie
B) an instance of compound data
C) an instance of a data structure
D) a value of type Movie
E) All of the Above
F) None of the Above
(define-struct movie (title director length dvd?))
; a Textbook is a (make-book String String Natural Boolean)
; interp: a movie where
; title is the movie’s title
; director is the name of the movies’s director
; length is the length of the movie in minutes
; dvd? is whether the movie is available in dvd format (if true)
(define TOY (make-movie “Toy Story" "John Lasseter" 81 true))
(define LION (make-movie "The Lion King" "Rob Minkoff" 89 false))
Step by step
Solved in 2 steps
- In C++. The New York Times newspaper has published “best seller” lists since 1942. Book sales are tracked nationwide, leading to a list of those books which have recently sold the most copies. You will design, implement and test a C++ program which allows the user to search a subset of the books which have appeared in the New York Times best seller lists. For simplicity, the data set will only contain those books which have reached #1 on either of two lists (fiction and nonfiction) since 1942. The file included named bestsellers.txt contains the complete data set. Each line of the file contains the information for a separate book, which includes: title, author, publisher, date it first reached #1 on one of the best seller lists, and category (fiction or nonfiction). There is a tab character ('\t') between fields.Add a BestSellers class that contains a single attribute of a vector of Book objects, an addBook method that receives a Book object and adds it to the vector, and a display…It says there is an error in the class solution(the followup one), specifically in the read data function students[i].setGrade(); It says it is empty, but when I add the declaration char grade; to the function and change the statement to students[i].setGrade(grade); it still says there is an error. What does it need to be instead? Here is my code: #include <iostream> #include <string> using namespace std; const int numstudents = 20; class studentType { private: string studentFName; string studentLName; int testscore; char grade; public: void setName(string first, string last) { studentFName = first; studentLName = last; } void setScore(int score) { testscore = score; } void setGrade(char grade) { if (testscore >= 90) { grade = 'A'; } if (testscore <= 90 && testscore >= 80)…Need help with C++ Question. The question is attatched as a image, and the code is copied below: #include <iostream> 2 using namespace std; 3 4 class Student { 5 public: 6 friend Student OutputDuplicate (Student obj); // friend function 7 8 Student (); // Default constructor 9 10 Student (string n); // String constructor 11 12 Student (const Student & obj); // Copy constructor 13 14 Student& operator= (const Student & right); // Assignment operator 15 16 ~Student() ; // Destructor 17 18 private: 19 string name; 20 21 }; 22 23 // Default constructor 24 Student::Student() : name("no name") 25 { 26 // Intentionally left blank 27 } 28 29 // String constructor 30 Student::Student(string n) : name(n) 31 { 32 // Intentionally left blank 33 } 34 35 // Copy constructor 36 Student::Student(const Student &…
- Homework 10-2 Programming Challenge: 12 - Password Verifier Use the string data type. Do not use arrays of type char or any functions in the old "C String" libraries. Six characters? Seriously? Set the minimum password length to twelve characters. We will also require that the password not contain any space characters. In addition to the requirement that the password contain at least one upper case letter, one lower case letter, and one digit, add the additional requirement that the password contain at least one "special" character. We will consider any character that is printable, not alphanumeric, and not a space character to be "special." That includes punctuation, but may include additional non-punctuation characters. Unfortunately at our level of C++ it's more or less impossible for us to actually test passwords like Señor_99 but the ñ (with a tilde) would count as a special character using our rules. Write functions to complete these tasks as appropriate.Question 1 is already done need help with the others though This is the C code I have so far #include <stdio.h> #include <stdlib.h> struct employees { char name[20]; int ssn[9]; int yearBorn, salary; }; struct employees **emps = new employees()[10]; //Added new statement ---- bartleby // function to read the employee data from the user void readEmployee(struct employees *emp) { printf("Enter name: "); gets(emp->name); printf("Enter ssn: "); for(int i =0; i <9; i++) scanf("%d", &emp->ssn[i]); printf("Enter birth year: "); scanf("%d", &emp->yearBorn); printf("Enter salary: "); scanf("%d", &emp->salary); } // function to create a pointer of employee type struct employees *createEmployee() { // creating the pointer struct employees *emp = malloc(sizeof(struct employees)); // function to read the data readEmployee(emp); // returning the data return emp; } // function to…Exercise 8.4. Define the required function as indicated in the exercise. In the function, iterate over the parameter string s anduse a one-way selection statement and a counting variable to determine the number of occurrences of the parameter c in the string. EX 8.4 (Occurrences of a specified character) Write a function that finds the number of occurrences of a specified character in a string using the following header: def count(s, ch): The str class has the count method. Implement your method without using the count method. For example, count("Welcome", 'e') returns 2. Write a test program that prompts the user to enter a string followed by a character and displays the number of occurrences of the character in the string.
- Need help with a c++ building block question! Nongraded Implement the copy assignment operator= for the StringVar class using the options given on the right side window. Place the code into the left side using the arrows. It is possible to get the test case correct but not complete NOTE: Be careful! There are decoys! The this pointer is used extensively.. Assume that StringVar.h has the following declaration: #include <iostream> class StringVar {public:StringVar() : max_length(20) { // Default constructor size is 20value = new char[max_length+1];value[0] = '\0';}StringVar(int size); // Takes an int for sizeStringVar(const char cstr[]); // Takes a c-string and copies itStringVar(const StringVar& strObj); // Copy Constructor~StringVar(); // Destructorint size() const { return max_length; } // Access capacityconst char* c_str() const { return value; } // Access valueint length() const { return strlen(value); } // Access lengthStringVar& operator= (const StringVar&…c++ The Lock class of the preceding problem has a small problem. It does not support combinations that start with one or more zeroes. For example, a combination of 0042 can be opened by entering just 42. Solve this problem by choosing a different representation. Instead of an integer, use a string to hold the input. Once again, the combination is hardwired. You will see in Section 9.6 how to change it. Complete the following file:What am I doing wrong? I am supposed to do a class of Student, enter the functions and display all of the students that has a GPA equal to or greater than 3.0 #include <iostream>#include <string> using namespace std; //declare Student Class class Student { //private member of class private: string Full_Name; float Student_GPA; int Student_Rank; //public class members public: //function to get student name void setFullName(string studentName) { this->Full_Name = studentName; } //return student name function string getFullName() { return Full_Name; } //function to get student GPA void setStudentGPA(float studentGpa) { this->Student_GPA = studentGpa; } //member function to return student name float getStudentGPA() { return Student_GPA; } //member function to get student Rank void setStudentRank(int studentRank) { this->Student_Rank = studentRank; } //member function to return student name int getStudentRank() { return Student_Rank; } }; int main() {Student S;…
- python program that allows a user to track spending in three categories per month and return thehighest spending among all the months. The three categories are: rent, grocery, and utilities. Adictionary spend_dict, provided in the template file, holds the monthly expenditure for categories.spend_dict contains the name of month as key and value is a list of expenditure in three categories. Forexample: user spent $90 in grocery category in the month of January.spend_dict = {'Jan': [90,60, 50], 'Feb': [56, 30, 65], 'Mar': [100, 85, 78]}For this pyhton program, i want to find the user’s maximum expenditure from the given months.Lab Scenario:The template file contains a dictionary as described above. You need to define the following functionsas below:Question 5 Write a program in C++ that ranks a data set of Poker hands.2 3 4 5 6 7 8 9 10 J Q K A Suit: S H D C**This program should be able to tell the difference between higher hands of flushes and rank them accordingly. Full explain this question and text typing work only thanksWrite the less-than operator and assume positive num. // ***********I cant seem to be getting the test to pass them all and i don't know why. Please help and explain******* Also i can only implement the '<' operator function********* Givent the header file: int.h (i cannot change this!!) class Int { public: Int(); bool operator<(const Int& rhs) const; private: string m_digits; }; int.cpp file: (i can change this please help me implement the function!) #include <iostream>#include "int.h"using namespace std; bool Int::operator<(const Int& rhs) const{if (m_digits < rhs.m_digits) { return true; }} //this is the tester file I am given #include <iostream>#include <vector>#include <algorithm>#include "int.h" using namespace std; int main(){cout << boolalpha;cout << R"(Int("999") < Int("1000"): )";cout << (Int("999") < Int("1000")) << endl;cout << "Expected: true" << endl << endl;cout <<…