OBJECT ORIENTED PROGRAMMING LESSON LABORATORY EXERCISE-5 Problem: We have a compact disc object, we have to place new songs inside according to the capacity. The capacity is 60 minutes. The user enters the duration of the new song from keyboard and the program places the new song inside the cd and informs the user. If the total duration of the songs exceeds the capacity then program warns the user. For example: Let's say, capacity of the cd is 60 minutes. Enter the duration of the new song: 10 Cd has 10 minutes of songs, you can load 50 minutes more. Enter the duration of the new song: 60 Cd has 10 minutes of songs, you can nor exceed the cd capacity Write CompactDisc class and create a cd object in your program to solve the problem.
Q: I need answers for d,e,f and these are subparts where you should answer 3 subparts.
A: Features of Oracle Database Management System:- Tools for Assistance SQL Server Profiler, BI tools,…
Q: Find a reduced grammar equivalent to SaC ISB A-bSCa BaSB IbBC C-ABC lad
A: Reduction of grammar refers to identification of those grammar symbols called as useless grammar…
Q: I'm not clear with your explanation. Why do you store just the address of expiration_date but not…
A: There is No Need 2D Matrix here you need to understand double pointer: int main() { int v = 76;…
Q: Discuss Representation of number.
A:
Q: Explain SEGMENT & ENDS
A: The beginning of a logical segment is indicated by the SEGMENT directive. The segment's name should…
Q: java language design a Java program for International Student Management. The source code should…
A: code in java programming language to use the inner class, package name and students details
Q: Provide details about your own experience in obtaining credentials and training.
A: Definition: An item, person, or organization may be certified if it possesses specific qualities…
Q: Explain Multitask DPDA.
A:
Q: The following assembly instructions will: MOV AH,09 MOV DX,OFFSET MSG INT 21H Output character…
A: Below I have provided the solution to the given question
Q: C++ Double Pointer: Can you draw picture of what this means : Food **table? struct Food { int…
A: Pointer: Pointer is a variable which is used to store the address of another variable. Syntax to…
Q: Python code keeps failing. Can someone help me locate the issue
A: Given code: class Mancala: def __init__(self): """Initialize the game.""" #…
Q: Name the commonly used architectural styles.
A: The architecture used in a software system refers to the particular formats along with the patterns…
Q: simplify the function to 4 literals using algebraic manipulation by applying the postulates and…
A: To solve this boolean expression we need to do some algebraic manipulations and need to apply…
Q: Explain what is the global assembly cache (GAC) in MS.NET?
A: Definition: The Global Assembly Cache is a machine-wide to code cache that exists on each computer…
Q: please solve again
A: The area of a triangle of sides "a" , "b" and "c" can be calculated using the Heron's formula is as…
Q: Prove "Let L be a language accepted by deterministic PDA, then the complement of L, can also be…
A: In formal language theory, where that the deterministic context-free languages and are a proper…
Q: there is a software that can input and outline the question bank, and can automatically generate a…
A: Class interaction diagram as been return step 2
Q: Create a python code i. Using an event control loop, your program must ask the user to enter inputs…
A: THE ALGORITHM OF THE CODE:- 1. Initialize an empty dictionary ‘d’.2. Initialize an empty list ‘l’.3.…
Q: Explain what is the global assembly cache (GAC) in MS.NET?
A: Definition: The Global Assembly Cache is a machine-wide code cache that exists on each computer that…
Q: Implement Algorithm for Lockstep protocol. in: local player ; action a; set of remote players P…
A: in: local player ; action a; set of remote players Pout: set of players’ actions Rlocal: commitment…
Q: ntity relationship (ER) model is a logical representation of an enterprise data. ER model is a…
A: Introduction ER Model: A consistent representation of an enterprise's information is the ER model.…
Q: Test whether the following grammars are ambiguous. 1. SOS1S11S0S | E 2. S-AA AaAb I bAale
A:
Q: Explain what is the global assembly cache (GAC) in MS.NET?
A: Definition: Each Common Language Runtime-installed computer has a Global Assembly Cache. Global…
Q: What is EVA?
A: what is EVA answer in below step.
Q: can be used to detect poison. A single drop of poison will turn the test strip positive permanently.…
A: The answer is given below.
Q: Can you give me a definition of "security service"?
A: Introduction: An information transmission or processing service that increases the security of an…
Q: OBJECT ORIENTED PROGRAMMING LESSON LABORATORY EXERCISE-5 Problem: We have a ship object, we have to…
A: The consumer enters the amount of the load from the keyboard and the application loads the quantity…
Q: Can you write the code by using java and thank you
A: The JAVA code is given below with output screenshot
Q: Apply the apriori algorithm to the following data set. Trans_id Items_purchased milk, bread, eggs…
A: According to the information given:- We have to follow the instruction to find the minimum support…
Q: Implement a CircularArray class that supports an array-like data structure which can be efficiently…
A: This problem really has two parts to it. First, we need to implement the CircularArray class.…
Q: A list of paragraphs returned by document is the same as an array of even numbers.…
A: Definition: There are no distinctions between an array of even numbers and an array of paragraphs…
Q: For the parametric equation: x1 =cos(6t) + cos(6t)/2+ sin(10 * t) /3 y1 = Math.sin(6t) + sin(6t) /…
A: x1 =cos(6t) + cos(6t) /2+ sin(10 * t) /3 y1 = Math.sin(6t) + sin(6t) / 2+ cos(10t) /3; for t in…
Q: Who in an organisation has the final say over when and how data will be used or managed? Whose…
A: Decisions are made using data in a process known as data-driven decision-making. The management uses…
Q: Explain instantaneous Description for Turning Machines.
A: A Turing Machine is a mathematical model which consists of an infinite length tape divided into…
Q: 1. Create a bubble sort code
A: Here I am doing #1. Kindly note that as per our guidelines we are supposed to answer the first…
Q: What is path compression?
A:
Q: 13) A linked list is given and the number of the nodes in this linked list is not known. You have to…
A: INTUITION-: Find difference between sum of all nodes in linked list and sum of first (length -x)…
Q: Outline the parameters of application security.
A: Introduction Parameters are an essential component of every web application, and they must be…
Q: Define maintenance.
A:
Q: When and how does a company develop its information security blueprint, which serves as the…
A: Introduction: Information security blueprint is the foundation for all security policies, education…
Q: Construct PDA accepting the language L = {a^ b^ In>0}.
A:
Q: Give an explanation of how a challenge-response authentication system works. This method is more…
A: Introduction: Password-based systems do not provide the same level of security as challenge-response…
Q: i. Add a function named readfile() to your program that takes a string (filename) as the parameter.…
A: i) Algorithm for the code:- 1. Start 2. Open the file with the 'r' flag for reading. 3. Read the…
Q: Assume that on or more switches are closed simultaneously. You are required to: Write a program to…
A: we need a comparator or we can use and and not gate as it is just for one equals compaision
Q: Add the following numbers in binary using 2's complement to represent negative numbers. Use a word…
A: Introduction: In this question, we are asked to add (-25) and (-18) and check whether the condition…
Q: Gfgfhffhhffyfy
A: The architecture used in a software system refers to the particular formats along with the patterns…
Q: There are advantages and disadvantages to passing parameters instead of using a global variable in a…
A: Because parameter just has a scope inside the function, it uses less memory. Because a parameter has…
Q: C PROGRAMMING Write a FUNCTION program that passes the length entered by the user to a function and…
A: Step-1: StartStep-2: Declare variable length and take input from userStep-3: Call function…
Q: 1) Describe the difference(s) between an authenticated user and an authorised user.
A: Note: Due to company policies I am compelled to solve only one question and that is the first…
Q: in C program For this assignment, you will need to build a program that does the following: The…
A: logic:- set counter=1 read first number from user and assign it to number variable and largest…
Step by step
Solved in 4 steps with 2 images
- Children often play a memory game in which a deck of cards containing matching pairs is used. The cards are shuffled and placed face down on a table. The players then take turns and select two cards at a time. If both cards match, they are left face up; otherwise, the cards are placed face down at the same positions. Once the players see the selected pair of cards and if the cards do not match, then they can memorize the cards and use their memory to select the next pair of cards. The game continues until all the cards are face up. Write a program to play the memory game. Use a two dimensional array of 4 rows and 4 columns to use a deck of 16 cards with 8 matching pairs and you can use numbers 1 to 8 to mark the cards. (If you use a 6 by 6 array, then you will need 18 matching pairs, and so on.) Use random number generators to randomly store the pairs in the array. Use appropriate functions in your program, and the main program should be merely a call to functions. Extra credit:…Children often play a memory game in which a deck of cards containing matching pairs is used. The cardsare shuffled and placed face down on a table. The players then take turns and select two cards at a time.If both cards match, they are left face up; otherwise, the cards are placed face down at the same positions.Once the players see the selected pair of cards and if the cards do not match, then they can memorize thecards and use their memory to select the next pair of cards. The game continues until all the cards areface up. Write a program to play the memory game. Use a two-dimensional array of 4 rows and 4 columnsfor a deck of 16 cards with 8 matching pairs. You can use numbers 1 to 8 to mark the cards. (If you use a6 by 6 array, then you will need 18 matching pairs, and so on.) Use random number generators torandomly store the pairs in the array. Use appropriate functions in your program, and the main programshould be merely a call to functions. I need to figure out how to do…SPIM simulator (QtSpim). Simulation: Write a MIPS program that computes the expression; y = A * B + C * D Where A, B, C, and D are integers
- eeringQ&A LibraryCreate a java program 1. Broken Record Looping strings works like playing a broken record – it repeats something over and over again. But what's great about loops is that we can define as to how many times it will repeat something with proper code, and that's what we're about to do now using while() loops. Instructions Scan a positive integer and store it in a variable. Using while() loop, repeatedly print out "CodeChum is awesome" for the same number of times as that of the inputted integer. Each outputted string must be separated in new lines. Don't forget to make an increment variable that will increase its value per iteration so as to not encounter a forever loop and have errors, okay? Input Format A line containing an integer. Input Sample 4 Output Format Multiple lines containing a string. Output Sample CodeChum·is·awesome CodeChum·is·awesome CodeChum·is·awesome CodeChum·is·awesome Create a java program 1. Broken Record Looping strings works like playing…Please do this in Python Programming Scenario As you probably know, Sudoku is a number-placing puzzle played on a 9x9 board. The player has to fill the board in a very specific way: each row of the board must contain all digits from 0 to 9 (the order doesn't matter) each column of the board must contain all digits from 0 to 9 (again, the order doesn't matter) each of the nine 3x3 "tiles" (we will name them "sub-squares") of the table must contain all digits from 0 to 9. If you need more details, you can find them here. Your task is to write a program which: reads 9 rows of the Sudoku, each containing 9 digits (check carefully if the data entered are valid) outputs Yes if the Sudoku is valid, and No otherwise. Test your code using the data we've provided. Test data Sample input: 295743861 431865927 876192543 387459216 612387495 549216738 763524189 928671354 154938672 Sample output: Yes Sample input: 195743862 431865927 876192543 387459216 612387495 549216738 763524189 928671354…The Game of Master Mind is performed in the following way:Each of the computer's four slots will hold a ball that is either red (R), yellow (Y), green (G), or blue (B). The computer may have the following configuration: RGGB (Slot #1 is red, Slots #2 and #3 are green, and Slot #4 is blue).The user is making an educated guess at the answer. For instance, you may assume YRGB.You receive a bonus when you predict the right colour for the right slot "hit:' You receive an if you choose a colour that is real but is in the incorrect slot "pseudo-hit:' Keep in mind that a hit slot can never also qualify as a pseudo-hit.For example, if the actual solution is RGBY and you guess GGRR, you have one hit and one pseudohitWrite a method that, given a guess and a solution, returns the number of hits and pseudo-hits
- In number theory, a happy number is a number which eventually reaches 1 when replaced by the sum of the square of each digit. For instance, 13 is a happy number because 12 + 3? = 10 and 1² + o² = 1. On the other hand, 4 is not a happy number because the sequence starting with 4 = 16 and 12 + 62² = 37 and eventually reaches to 4 that is the number that started the sequence, and so the process continues in an infinite cycle without ever reaching 1. Write, Compile and Execute a Java method that computes whether a given number is happy or sad.Java Program Scenario: A high school has 1000 students and 1000 lockers, one locker for each student. On the first day of school, the principal plays the following game: She asks the first student to open all the lockers. She then asks the second student to close all the even-numbered lockers. The third student is asked to check every third locker. If it is open, the student closes it; if it is closed, the student opens it. The fourth student is asked to check every fourth locker. If it is open, the student closes it; if it is closed, the student opens it. The remaining students continue this game. In general, the nth student checks every nth locker. If the locker is open, the student closes it; if it is closed, the student opens it. After all the students have taken their turns, some of the lockers are open and some are closed. Write a program that prompts the user to enter the number of lockers in a school. After the game is over, the program outputs the number of lockers and the…Coupon collector is a classic statistic problem with many practical applications. The problem is to pick objects from a set of objects repeatedly and determine how many picks are needed for all the objects to be picked at least once. A variation of the problem is to pick cards from a shuffled deck of 52 cards repeatedly and find out how many picks are needed before you see one of each suit. Assume a picked card is placed back in the deck before picking another. Write a program to simulate the number of picks needed to get four cards from each suit and display the four cards picked (it is possible that a card may be picked twice).
- Write a complete processing program so that you can control a red ball on the screen using keyboard arrow keys: UP/DOWN: ball moves up/down; LEFT/RIGHT: ball moves left/right; when the ball hits border, it won't be able to move across the border is (stuck there instead). R/r key resets the ball back to center.MastermindIn this assignment, you will program the well-known game Mastermind. In Mastermind, player 1creates a pattern consisting of a pre-approved number of colored pins. Then player 2 has to guessthis pattern in as few turns as possible. Each turn, player 2 can guess what the pattern mightbe. Player 1 will then tell player 2 how many correct colors were guessed, and how many of thosecorrectly guessed colors were guessed in the right place. Player 2 can then use this information toimprove their guess for the next turn. When player 2 guesses the correct pattern, the game ends.Write a program that acts as player 1 of the Mastermind game. This program will generate a(random) pattern, and will play according to the game’s rules, with a human acting as player 2.The program should stop when the user guesses the pattern.Additionally, the program has to conform with the following specifications:1. Because of practical reasons, the pattern will consist of capital letters instead of colors.2.…TASK 3 In number theory, a happy number is a number which eventually reaches 1 when replaced by the sum of the square of each digit. For instance, 13 is a happy number because 12 + 3? = 10 and 12 + 0² = 1. On the other hand, 4 is not a happy number because the sequence starting with 4? = 16 and 12 + 6? = 37 and eventually reaches to 4 that is the number that started the sequence, and so the process continues in an infinite cycle without ever reaching 1. Write, Compile and Execute a Java method that computes whether a given number is happy or sad.