275_Final_Project
.pdf
keyboard_arrow_up
School
California State University, Long Beach *
*We aren’t endorsed by this school
Course
275
Subject
Computer Science
Date
Jan 9, 2024
Type
Pages
61
Uploaded by KidMosquitoMaster430
Final Report
Introduction:
We will write a C++ program that will simulate the Go Fish Card Game for
multiple players including A.I. The project will contain the following classes: GoFishGame,
Player, Mode, PlayerProfile, PlayByPlay, Account, and more if needed, each providing many
functions and dynamics of the game. A menu will also be provided for easy accessing for the
user and records that will allow the player to see game statistics. At the start of the game, each
player is given $2000. A victory will earn players $1000 while losing results in $1000 loss. The
distribution of money depends on the number of players involved, further influencing strategy
players must make throughout the game. Through this simulation, the project will provide
players to enjoy the Go Fish Game while learning the ins and outs of the code.
Pseudocodes:
card.cpp
Rank (integer variable)
Suit (integer variable)
-
Card():
Set rank to 0
Set suit to 0
-
printCard():
Output “Rank: <rank value>”
Output “Suit: <suit value>”
deck.cpp
-
Deck():
Array with 52 card objects
Set numCards to 52
Set count to 0
For each rank from 0 to 12 (13 ranks)
For each from 0 to 3 (4 suits)
Set cards[count] rank to rank
Set cards[count] suit to suit
Increment count
-
~Deck():
Delete the cards array
-
getCards():
Return the cards array
-
shuffleDeck():
Random number generator
Repeat 1000 times:
Generate two random cards
Swap cards
-
deal():
Create Card object draw and set it to cards
Subtract numCards by 1
Return draw
-
printDeck():
For each card in cards up to numCards:
Output “Rank: <rank value> Suit: <suit value>”
game.cpp
-
Game():
Set isGameOver to false
-
intToRank(rank):
Create an array with ranks
Return ranks
-
gameOver():
If the game is over: set isGameOver to true
Else: set isGameOver to false
-
displayGame():
Output the current status of the game
-
checkInput(question, valid):
Do-while loop using question to only accept inputs that are valid
Return integer input
-
checkAndChoose():
If player has fewer than 1 card in hand and the game is not over:
Draw a card
Display current game status
Set index to checkInput, asks user to select a card
Set rankChosen to the rank of card at index in player’s hand
Output result
Return rankChosen
-
checkAndRand():
Computer draws a card (if cpu game)
Add card to hand
Display game status
Generate a random index randInd
Set rankChosen to a randInd
Computer asks for the chosen randInd card
Return rankChosen
-
compHasMatch(rankChosen):
Count and remove cards of rankChosen from player’s hand
Add the removed cards to player’s hand
If count > 0: Computer gives you count
If the player's hand has a book of rankChosen: “You got a book!”
Remove the book from player
-
humHasMatch(rankChosen):
Similar to the above code
-
humFish(rankChosen, &myTurn):
Output “You Go Fish.”
Deal a card from the deck and gets its rank
Output “You draw a <rank value>”
Add dealt card to hand
If rankDealt is equal to rankChosen:
Output “You fished for what you wanted!”
Remove the book from players
Else:
If players hand has a book of rankChosen:
Output “You got a book!”
Remove the book from players
Output “COMPUTER’S TURN!”
- compFish(rankChosen, &compTurn):
Output "Computer Go Fish."
Deal a card from the deck and get its rank rankDealt
Output "Computer draws a card."
Add the dealt card to players’s hand
If rankDealt is equal to rankChosen:
Output "Computer fished for what it wanted!"
If players[0]'s hand has a book of rankChosen:
Output "Computer got a book!"
Remove the book from players
Else:
If players's hand has a book of rankDealt:
Output "Computer got a book!"
Remove the book from players
Output "YOUR TURN!"
- humanTurn():
Display the current game status
Set myTurn to true
While the game is not over and myTurn:
Get rankChosen from checkAndChoose()
If player's hand has a rank of rankChosen:
Call compHasMatch(rankChosen)
Else:
Call humFish(rankChosen, myTurn)
Call gameOver()
- compTurn():
Display the current game status
Set compTurn to true
While the game is not over and compTurn:
Get rankChosen from checkAndRand()
If player's hand has a rank of rankChosen:
Call humHasMatch(rankChosen)
Else:
Call compFish(rankChosen, compTurn)
Call gameOver()
- beginTurns():
Shuffle the deck
For i from 0 to 6:
Add a card dealt from the deck to players[0]'s hand
For i from 0 to 6:
Add a card dealt from the deck to players[1]'s hand
While the game is not over:
Call humanTurn()
Call compTurn()
Output "GAME OVER"
Display the current game status
If players[0] has more books than players[1]:
Output "Computer Wins!"
Else:
Output "You Win!"
GoFishGame.cpp
-
Card: contains rank and suit
-
Getters and setters: for rank and suit
-
Deck class: array of cards that contains up to 52, ranks from 0 to 12 and suit from 0 to 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Step1-Study the scenario below and create a Java Program for Builders Warehouse, The program must consist of a class called Materials to handle the details of the materials. The program should read the materials details from the material.txt file then use a LinkedList to store the material details. Then finally the products stored in the LinkedList must be displayed like the sample code below
step 2-There must be clear code and a screenshot of the code running.
arrow_forward
In terms of programming, it is preferable to have a deeper level of access rather than a shallower level of access; consequently, you should not base your decision just on how well something runs.
arrow_forward
In python, complete both sections please
Section 5: The StudentAccount class This class represents a financial status of the student based on enrollment and is saved to a Student object as an attribute. This class should also contain an attribute that stores the price per credit, initially $1000/credit. This cost can change at any time and should affect the future price of enrollment for ALL students. Attributes Type Name Description Student student The Student object that owns this StudentAccount. numerical balance The balance that the student has to pay. dict loans A dictionary that stores Loan objects accessible by their loan_id. Methods Type Name Description numerical makePayment(self, amount) Makes a payment towards the balance. numerical chargeAccount(self, amount) Adds an amount towards the balance. Special methods Type Name Description str __str__(self) Returns a formatted summary of the loan as a string. str __repr__(self) Returns the same formatted summary as __str__.…
arrow_forward
Tetris Game on microbit using blocks or python
The game must use at least 5 peripherals (buttons, LED matrix, temperature sensor, touch sensor, light sensor, microphone, speaker, accelerometer, compass)
All devices used must have events that interconnect them with each other (ex: when button A is pressed the current temperature value is displayed on the LED matrix)
The game must implement different behaviors for on_start() and on_forever()
The game must implement a monitoring system (display in the console or graphically) of the data provided by at least one device of your choice.
arrow_forward
Apply for higher studies: The system allows the students to search for study programs and apply
for higher studies in foreign universities (applying requires attaching transcripts). Administrator
can use this application to download reports add more seats into the course. etc etc
Create your own case study (problem statement) for the above application by expanding it with more
details from your side and for this case study
1. Class diagram with at least 4 classes and explain all the relationships
3. Draw the use case diagram
arrow_forward
You will be writing a scheduling application allowing a convention center to schedule events. This program will contain two different classes: Date and Event. Both classes should be defined on their own .py modules.
You may use the Date class we designed in class in lecture 18 (which will also be posted on Canvas).
The Event class should have the following attributes:
event_date (which should be a Date object)
event_name
start_hour: Uses a 24-hour clock, so should be a value between 0 and 23
endHour: Uses a 24-hour clock, so should be a value between 0 and 23
The Event class should have the following methods:
__str__. Return a string representation of all important info about this Event: The name of the event, the start and end times (you can simply print their value i.e. from 14 to 16) and the Date.
Properties and setters for the attributes.
A constructor which takes a name, start and end hours, and a Date object.
Note: For sake of simplicity, each event will only take one day…
arrow_forward
Please help me write a program code for this project*Game design*creating a game.*Project description*:1. The game should ask the number of participants, then generate a random number which is stored in memory. The program should ask player 1 to enter a number of his choice. Then subtract that number from the number that was randomly generated by the computer. If the result of the operation is <0, player 1 loses. If the result is >= 0, the program should ask the next player to choose a number. The same operation is now performed on the number entered by player 2 which is then subtracted from the remainder after the operation carried out by player 1 and if the result is <0, player 2 loses else, the program continues until we have a loser.
*Note* The program should generate random numbers from 0 - 100 inclusive and the program is not supposed to display the result of the operation.
arrow_forward
For this milestone, you will be submitting a working draft of the code for a simplified version of the text-based game that you are developing for Project Two. You will focus on displaying how a room dictionary works with the “move” commands. This will include the if, else, and elif statements that move the adventurer from one room to another.
Before beginning this milestone, it is important to understand the required functionality for this simplified version of the game. The game should prompt the player to enter commands to either move between rooms or exit the game. IMPORTANT: The “Move Between Rooms” process in the Milestone Simplified Text Game Flowchart is intentionally vague. You designed a more detailed flowchart or pseudocode for this process as a part of your work on Project One. Think about how your design will fit into this larger flowchart.
In PyCharm, create a new code file titled “ModuleSixMilestone.py.” At the top of the file, include a comment with your name. As you…
arrow_forward
For this milestone, you will be submitting a working draft of the code for a simplified version of the text-based game that you are developing for Project Two. You will focus on displaying how a room dictionary works with the “move” commands. This will include the if, else, and elif statements that move the adventurer from one room to another.
Before beginning this milestone, it is important to understand the required functionality for this simplified version of the game. The game should prompt the player to enter commands to either move between rooms or exit the game.
IMPORTANT: The “Move Between Rooms” process in the Milestone Simplified Text Game Flowchart is intentionally vague. You designed a more detailed flowchart or pseudocode for this process as a part of your work on Project One. Think about how your design will fit into this larger flowchart. In PyCharm, create a new code file titled “ModuleSixMilestone.py.” At the top of the file, include a comment with your name. As…
arrow_forward
For this milestone, you will be submitting a working draft of the code for a simplified version of the text-based game that you are developing for Project Two. You will focus on displaying how a room dictionary works with the “move” commands. This will include the if, else, and elif statements that move the adventurer from one room to another.
Before beginning this milestone, it is important to understand the required functionality for this simplified version of the game. The game should prompt the player to enter commands to either move between rooms or exit the game. Review the Milestone Simplified Dragon Text Game Video and the Milestone Simplified Text Game Flowchart to see an example of the simplified version of the game. A video transcript is available: Transcript for Milestone Simplified Dragon Text Game Video. IMPORTANT: The “Move Between Rooms” process in the Milestone Simplified Text Game Flowchart is intentionally vague. You designed a more detailed flowchart or pseudocode…
arrow_forward
Write this code in C# :
Scenario:
A dog shelter would like a simple system to keep track of all the dogs that pass through their facility. You are required to make a command line-based dog shelter management application. Your application must allow a user to add, edit, search and view Contacts.
The program must have a menu consisting of the following six (6) options:
Add dog
View all dogs
View all available dogs
View specific dog
Update dog home status
Exit
Brief descriptions of each option in the menu
Menu Item
Description
Add Dog
1) Asks the user for all the state value information for a dog.
2) Checks if there is space in the array to hold the new dog.
3) Check that the dogId is not already used in the system.
4) Creates a new Dog object and adds it to the array if there is space. If the array is full, print “Sorry… the Shelter is Full!”.
Note: All new dogs have no home as yet (foundHome = false).
View all dogs
This menu option shows all dogs in the…
arrow_forward
Object adapters and class adapters each provide a unique function. These concepts are also significant due to the significance that you attach to them.
arrow_forward
Please help me with this using java.
create a java code for a trivia game. Include a game menu with the option of play game, settings, and instructions. The game menu must also have a graphics as well.
please use the following when creating the game menu and the game
1. Arrays
2. recursion
3. fractals
4. GUI
5. Inheritance
6. Insertion
7. Class and objects
arrow_forward
PLEASE help with the following C#.NET
using the follwoing class make a driver class which outputs the patient healthr record
Write a driver class (app) that prompts for the person’s data input, instantiates an object of class HeartRates and displays the patient’s information from that object by calling the DisplayPatientRecord, method.
essentially make a main method which asks the user to manually enter the data
using System;namespace A1Question1{class HeartRates{//class attributes privateprivate string _First_Name;private string _Last_Name;private int _Birth_Year;private int _Current_Year;// Constructor which receives private parameters to initialize variablespublic HeartRates(string First_Name, string Last_Name, int Birth_Year, int Current_Year){_First_Name = First_Name;_Last_Name = Last_Name;_Birth_Year = Birth_Year;_Current_Year = Current_Year;}// Auto-Implemented mutators and accessorpublic string First_Name { get; set; }public string Last_Name { get; set; }public int…
arrow_forward
Write this code in C# language:
Scenario:
A dog shelter would like a simple system to keep track of all the dogs that pass through their facility. You are required to make a command line-based dog shelter management application. Your application must allow a user to add, edit, search and view Contacts.
The program must have a menu consisting of the following six (6) options:
Add dog
View all dogs
View all available dogs
View specific dog
Update dog home status
Exit
Brief descriptions of each option in the menu
Menu Item
Description
Add Dog
1) Asks the user for all the state value information for a dog.
2) Checks if there is space in the array to hold the new dog.
3) Check that the dogId is not already used in the system.
4) Creates a new Dog object and adds it to the array if there is space. If the array is full, print “Sorry… the Shelter is Full!”.
Note: All new dogs have no home as yet (foundHome = false).
View all dogs
This menu option shows all…
arrow_forward
Task 1: Planning and Passengers
For this task we will be creating an overview of the classes in our system using
the Unified Modeling Language (UML) Class Diagram.
IMPORTANT: When submitting this question, you must submit it as a Portable
Network Graphics (PNG) file.
Below is a list of tools for drawing UML diagrams, but you are free to use any
program of your choosing:
. Google Drawings (https://docs.google.com/drawings/)
. Plant UML (https://plantuml.com/)
• Inkscape (https://inkscape.org/)
• Visual Paradigm (https://online.visual-paradigm.com/)
You may use any tool you wish as long as your diagram follows the UML
conventions and is in the correct format (PNG).
Instructions IMPORTANT: Unless otherwise stated, all attributes should be
private or protected. You may decide for yourself whether an attribute should
be private or protected.
Draw the UML class diagrams for the following classes:
1. An abstract Java class called Person that has the following attributes:
a String called…
arrow_forward
In python, please complete both sections
Section 3: The Semester class Stores a collection of Course objects for a semester for a student. Attributes Type Name Description int sem_num The semester number for this object. dict courses Stores courses to be taken in the semester. The id of the course as the key and the Course object as the value. Methods Type Name Description (many) addCourse(self, course) Adds a Course to the courses dictionary (many) dropCourse(self, course) Removes a course from courses. int totalCredits(self) A property method for the total number of credits. bool isFullTime(self) A property method that returns True if this is full-time. Special methods Type Name Description str __str__(self) Returns a formatted summary of the all the courses in this semester. str __repr__(self) Returns the same formatted summary as __str__. addCourse(self, course) Adds a Course to the courses dictionary Input (excluding self) Course course The Course object to add to this semester.…
arrow_forward
PYTHON
In order to parse data to start a simulation, users must enter data correctly.
Suppose that the simulation requires 2 information from the user, which is called 'soil_key' and 'soil_data.' The user will enter 'soil_key' first, following with 'soil_data.' We need to check if the user enters the 'soil_data' data correctly. All elements in soil data ('soil_data') must be characters defined in the soil keys ('soil_key'). Both soil_key and soil_data are lists. Consider an example:
INPUT:
soil_key = ['C', 'Clay', ' B', 'Bedrock', ' V', 'Void']
soil_data1 = [ ['V', 'C', 'V'], ['C', 'V', ' '], ['B', 'M', 'B'] ]
soil_data2 = [ ['B', 'C', 'V'], ['C', 'V', ' B'], ['B', 'C', 'B'] ]
OUTPUT:
soil_data1: check data again. Parsing failed!
soil_data2: Parsing successfully.
Write a python function that checks if the soil data is being entered correctly. Return True and print 'Parsing successfully' for correct data. Otherwise, return False and tells the user 'check data again. Parsing…
arrow_forward
Q2 Create MusicOrganizer project using BlueJ .
(i) Create a MusicOrganizer class and declare an ArrayList for storing the file
names of music files into the String object.
(ii) Create a constructor for the music organizer class and assign the field to the
ArrayList.
(iii) Write a method to add a file to the collection.
(iv) Write a method to return the number of files in the collection.
(v) Write a method to remove a file from the collection.
(vi) Make a screen shot of the coding and output.
arrow_forward
arrow_back
Starting Out With Visual C# (5th Edition)
5th Edition
Chapter 11, Problem 1PP
arrow_back_ios
PREVIOUS
NEXT
arrow_forward_ios
Question
share_out_linedSHARE SOLUTION
Chapter 11, Problem 1PP
Program Plan Intro
Employee and ProductionWorker Classes
Program plan:
Design the form:
Place a three text boxes control on the form, and change its name and properties to get the employee name, number, and hourly pay rate from the user.
Place a four label boxes control on the form, and change its name and properties.
Place a two radio buttons control on the form, and change its name and properties.
Place a one group box control on the form, and change its name and properties.
Place a command button on the form, and change its name and properties to retrieve the object properties and then display the values into label box.
In code window, write the code:
Program.cs:
Include the required libraries.
Define the namespace “Program11_1”.
Define a class “Program”.
Define a constructor for the…
arrow_forward
Computer Science
Help with C# programming in Microsoft Visual Studio:
You will be creating a program that uses a GUI to allow the user to enter information about an employee. In addition to the main class you create, there will also be four additional classes named fileOutput, baseEmployee, superEmployee and advancedEmployee which you will have to create. For this problem, the baseEmployee class will need to accept user input for a name, email and address for a base employee. The advancedEmployee class should be able to extend the baseEmployee, by allowing an hourly rate and hours worked to be entered. Hours worked must be in the range of 0 to 80 and hourly rate is in the range of 10 to 42.50. The superEmployee class will then extend the advancedEmployee class and allow permission level of high, medium or low to be entered, along with their office number. The program should show a radio button that allows the user to choose whether or not the user is a base employee, advanced…
arrow_forward
C++ Visual Studio 2019
Instructions
Complete #1 & #2. Please submit just one file for the classes and main to test the classes. Just create the classes before main and submit only one cpp file. Do not create separate header files. Please note: the deleteNode needs to initialize the *nodePtr and the *previousNode. The code to do this can be copied from here: ListNode *nodePtr, *previousNode = nullptr;
arrow_forward
Design a class named CustomerRecord that holds a customer number, name, and address. Include separate methods to 'set' the value for each data field using the parameter being passed. Include separate methods to 'get' the value for each data field, i.e. "return" the field's value. Pseudocode:
arrow_forward
A counter variable is normally used in a program to keep track of the current count value.Create your own counter data type which is able to perform common counter operations such as increment (by one) the counter value and decrement (by one) the counter value. It is also able to set the counter to a specific value and to retrieve the counter value. The minimum value the counter can attain is zero, while the maximum value attained is stored in attribute maxValue. The class should have the following private members (attributes):
(first picture)
In the main program, test the workablity of your member functions by first setting an initial value to the counter. Display this value before proceeding. Then test other functions by randomly incrementing and decrementing the object’s value. Be sure to keep track of your actions. At the same time you should also make sure that your minimum value should not be less than zero. Once this is reached you will not be allowed to do further decrements.…
arrow_forward
Simulation parameters:
• Define a step size h. Try something small like 0.001 seconds.
• Define a length for the simulation-perhaps 10 seconds for now, but feel free to adjust it as
you see fit.
• Create a list of times that begins at 0 and goes up to the simulation length in steps of h. The
actual simulation only cares about the step size, so we won't use this in the simulation but we'll
use it for plotting at the end.
• Calculate the length of the list created in the previous step and assign it to a variable n.
Data arrays:
• Create a list r of length n that is all zeros (np.zeros could come in handy here).
• Create a list s of length n that is all zeros.
Initial conditions:
• Set the first entry of r to be some initial height of your choosing.
• Set the first entry of s to be some initial velocity of your choosing.
First-order equations:
• We need to define a function that calculates the derivative of r. Since Eq. 2.14 says that r' s,
this is fairlv simply. We iust have to return c…
arrow_forward
Super Ghost Project
Rule changes:
The premise of the game remains the same, there are two players adding words to a growing word fragment. Each player will take turns attempting to add letters to a growing word fragment. The letter you select should attempt to force your opponent to spell a word or create a word fragment that has no possibility of creating a word. Unlike the prior ghost competition, when it is your turn you are allowed to add a letter to either the front or back of the word fragment.
Winning Criteria:
If your opponent spells a word that is at least 6 characters long
if your opponent creates a word fragment that has no possibility of creating a word
if your opponent takes longer than 60 seconds to select a word.
Tip: If you are the first player you can only spell words that are odd length thus you can only lose when you spell words that are odd but you can win when your opponent spells words that are even length. Accordingly, if you are the first player you should…
arrow_forward
code in java language :
kindly include comments for better understanding.
arrow_forward
Please do it in JavaScript or C#
1) Design and implement the class structure for a drawing application. A drawing is made up of a canvas that contains a collection of three different shapes: circles, lines, and boxes. Each shape can be drawn by calling a Draw() method for that shape. The canvas class should also have a draw method that draws all of the shapes it contains. You don’t have to actually draw anything on a screen; you can simulate drawing by writing a message to the console.For example, the code snippet: canvas.Draw();Drawing a circle at...Drawing a line at...etc. (For each shape on the canvas)
2)(Bonus) Consider re-writing the above answer (#1) differently where the canvas does not contain the shapes, but is able to draw any of the three shapes passed to it. Re-design canvas.Draw() if you need to. Your main() program should ask for user input on what shape to draw. Ask once, draw, then exit.could produce something like the following output to the console:
arrow_forward
Gradient FillIn this labwork are asked to write a GUI application again using AWT. This is a fairly easy labworkthat is more about getting used to synchronized online learning. You are expected to:• Draw two rectangles.• Both of them should be filled using GradientPaint() function of AWT. (Check out itsfunction definition that is listed below.)• The first gradient should be parallel to the diagonal of the first rectangle. The colorgradient should not be repeated (acyclic).• The second gradient should be horizontal. The color gradient should be repeated forthis one (cyclic).• You are free to choose the colors but other than that your output should be similar tothe example screenshot given below.
arrow_forward
Create a Student class, where attributes associated with each student are name, registration number, father name, degree and department. All attributes should not be accessed directly. One can view the details of all students. Note student attributes can not be changed by any means after initialization.In student class maintaining student count means your program could be able to tell the count of student objects created. (User static counter variable)
arrow_forward
A new video store in your neighborhood is about to open. However, it does not have a program to keep track of its videos and customers. The store managers want someone to write a program for their system so that the video store can operate.
The program will require you to design 2 ADTs as described below:
[1] VIDEO ADTDataOperationsVideo_ID (preferably int, auto-generated)Movie TitleGenreProductionNumber of CopiesMovie Image Filename
[1] Insert a new video
[2] Rent a video; that is, check out a video
[3] Return a video, or check in, a video
[4] Show the details of a particular video
[5] Display all videos in the store
[6] Check whether a particular video is in the store
[2] CUSTOMER PARENT ADTDataOperationsCustomer_ID (preferably int, auto-generated)NameAddress
[1] Add Customer
[2] Show the customer details
[3] Print list of all customers
[3] CUSTOMER-RENT CHILD ADTCustomer_ID (Video_ID (of all rented videos of a customer)
[1] Rent a Video (Add to the video ids rented)
[2] Return a…
arrow_forward
A new video store in your neighborhood is about to open. However, it does not have a program to keep track of its videos and customers. The store managers want someone to write a program for their system so that the video store can operate.
The program will require you to design 2 ADTs as described below:
[1] VIDEO ADTDataOperationsVideo_ID (preferably int, auto-generated)Movie TitleGenreProductionNumber of CopiesMovie Image Filename
[1] Insert a new video
[2] Rent a video; that is, check out a video
[3] Return a video, or check in, a video
[4] Show the details of a particular video
[5] Display all videos in the store
[6] Check whether a particular video is in the store
[2] CUSTOMER PARENT ADTDataOperationsCustomer_ID (preferably int, auto-generated)NameAddress
[1] Add Customer
[2] Show the customer details
[3] Print list of all customers
[3] CUSTOMER-RENT CHILD ADTCustomer_ID (Video_ID (of all rented videos of a customer)[1] Rent a Video (Add to the video ids rented)
[2] Return a…
arrow_forward
A new video store in your neighborhood is about to open. However, it does not have a program to keep track of its videos and customers. The store managers want someone to write a program for their system so that the video store can operate.
The program will require you to design 2 ADTs as described below:
[1] VIDEO ADTDataOperationsVideo_ID (preferably int, auto-generated)Movie TitleGenreProductionNumber of CopiesMovie Image Filename
[1] Insert a new video
[2] Rent a video; that is, check out a video
[3] Return a video, or check in, a video
[4] Show the details of a particular video
[5] Display all videos in the store
[6] Check whether a particular video is in the store[2] CUSTOMER PARENT ADTDataOperationsCustomer_ID (preferably int, auto-generated)NameAddress
[1] Add Customer
[2] Show the customer details
[3] Print list of all customers
[3] CUSTOMER-RENT CHILD ADTCustomer_ID (Video_ID (of all rented videos of a customer)
[1] Rent a Video (Add to the video ids rented)
[2] Return a…
arrow_forward
Assignment
First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects).
Then create a new Java application called "MultiTable" (without the quotation marks) that uses nested for loops to print a multiplication table as shown below.
The value of each cell should be computed using the values in the row and column headings (e.g., 1 * 1; 1 * 2; 1 * 3; etc.).
Make sure to match the below results as shown.
* | 1 2 3 4 5 6 7 8 9 ------------------------------- 1 | 1 2 3 4 5 6 7 8 9 2 | 2 4 6 8 10 12 14 16 18 3 | 3 6 9 12 15 18 21 24 27 4 | 4 8 12 16 20 24 28 32 36 5 | 5 10 15 20 25 30 35 40 45 6 | 6 12 18 24 30 36 42 48 54 7 | 7 14 21 28 35 42 49 56 63 8 | 8 16 24 32 40 48 56 64 72 9 | 9 18 27 36 45 54 63 72 81Copy and paste at least one sample run in your source code as a block comment at the bottom below the closing curly brace.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Related Questions
- Step1-Study the scenario below and create a Java Program for Builders Warehouse, The program must consist of a class called Materials to handle the details of the materials. The program should read the materials details from the material.txt file then use a LinkedList to store the material details. Then finally the products stored in the LinkedList must be displayed like the sample code below step 2-There must be clear code and a screenshot of the code running.arrow_forwardIn terms of programming, it is preferable to have a deeper level of access rather than a shallower level of access; consequently, you should not base your decision just on how well something runs.arrow_forwardIn python, complete both sections please Section 5: The StudentAccount class This class represents a financial status of the student based on enrollment and is saved to a Student object as an attribute. This class should also contain an attribute that stores the price per credit, initially $1000/credit. This cost can change at any time and should affect the future price of enrollment for ALL students. Attributes Type Name Description Student student The Student object that owns this StudentAccount. numerical balance The balance that the student has to pay. dict loans A dictionary that stores Loan objects accessible by their loan_id. Methods Type Name Description numerical makePayment(self, amount) Makes a payment towards the balance. numerical chargeAccount(self, amount) Adds an amount towards the balance. Special methods Type Name Description str __str__(self) Returns a formatted summary of the loan as a string. str __repr__(self) Returns the same formatted summary as __str__.…arrow_forward
- Tetris Game on microbit using blocks or python The game must use at least 5 peripherals (buttons, LED matrix, temperature sensor, touch sensor, light sensor, microphone, speaker, accelerometer, compass) All devices used must have events that interconnect them with each other (ex: when button A is pressed the current temperature value is displayed on the LED matrix) The game must implement different behaviors for on_start() and on_forever() The game must implement a monitoring system (display in the console or graphically) of the data provided by at least one device of your choice.arrow_forwardApply for higher studies: The system allows the students to search for study programs and apply for higher studies in foreign universities (applying requires attaching transcripts). Administrator can use this application to download reports add more seats into the course. etc etc Create your own case study (problem statement) for the above application by expanding it with more details from your side and for this case study 1. Class diagram with at least 4 classes and explain all the relationships 3. Draw the use case diagramarrow_forwardYou will be writing a scheduling application allowing a convention center to schedule events. This program will contain two different classes: Date and Event. Both classes should be defined on their own .py modules. You may use the Date class we designed in class in lecture 18 (which will also be posted on Canvas). The Event class should have the following attributes: event_date (which should be a Date object) event_name start_hour: Uses a 24-hour clock, so should be a value between 0 and 23 endHour: Uses a 24-hour clock, so should be a value between 0 and 23 The Event class should have the following methods: __str__. Return a string representation of all important info about this Event: The name of the event, the start and end times (you can simply print their value i.e. from 14 to 16) and the Date. Properties and setters for the attributes. A constructor which takes a name, start and end hours, and a Date object. Note: For sake of simplicity, each event will only take one day…arrow_forward
- Please help me write a program code for this project*Game design*creating a game.*Project description*:1. The game should ask the number of participants, then generate a random number which is stored in memory. The program should ask player 1 to enter a number of his choice. Then subtract that number from the number that was randomly generated by the computer. If the result of the operation is <0, player 1 loses. If the result is >= 0, the program should ask the next player to choose a number. The same operation is now performed on the number entered by player 2 which is then subtracted from the remainder after the operation carried out by player 1 and if the result is <0, player 2 loses else, the program continues until we have a loser. *Note* The program should generate random numbers from 0 - 100 inclusive and the program is not supposed to display the result of the operation.arrow_forwardFor this milestone, you will be submitting a working draft of the code for a simplified version of the text-based game that you are developing for Project Two. You will focus on displaying how a room dictionary works with the “move” commands. This will include the if, else, and elif statements that move the adventurer from one room to another. Before beginning this milestone, it is important to understand the required functionality for this simplified version of the game. The game should prompt the player to enter commands to either move between rooms or exit the game. IMPORTANT: The “Move Between Rooms” process in the Milestone Simplified Text Game Flowchart is intentionally vague. You designed a more detailed flowchart or pseudocode for this process as a part of your work on Project One. Think about how your design will fit into this larger flowchart. In PyCharm, create a new code file titled “ModuleSixMilestone.py.” At the top of the file, include a comment with your name. As you…arrow_forwardFor this milestone, you will be submitting a working draft of the code for a simplified version of the text-based game that you are developing for Project Two. You will focus on displaying how a room dictionary works with the “move” commands. This will include the if, else, and elif statements that move the adventurer from one room to another. Before beginning this milestone, it is important to understand the required functionality for this simplified version of the game. The game should prompt the player to enter commands to either move between rooms or exit the game. IMPORTANT: The “Move Between Rooms” process in the Milestone Simplified Text Game Flowchart is intentionally vague. You designed a more detailed flowchart or pseudocode for this process as a part of your work on Project One. Think about how your design will fit into this larger flowchart. In PyCharm, create a new code file titled “ModuleSixMilestone.py.” At the top of the file, include a comment with your name. As…arrow_forward
- For this milestone, you will be submitting a working draft of the code for a simplified version of the text-based game that you are developing for Project Two. You will focus on displaying how a room dictionary works with the “move” commands. This will include the if, else, and elif statements that move the adventurer from one room to another. Before beginning this milestone, it is important to understand the required functionality for this simplified version of the game. The game should prompt the player to enter commands to either move between rooms or exit the game. Review the Milestone Simplified Dragon Text Game Video and the Milestone Simplified Text Game Flowchart to see an example of the simplified version of the game. A video transcript is available: Transcript for Milestone Simplified Dragon Text Game Video. IMPORTANT: The “Move Between Rooms” process in the Milestone Simplified Text Game Flowchart is intentionally vague. You designed a more detailed flowchart or pseudocode…arrow_forwardWrite this code in C# : Scenario: A dog shelter would like a simple system to keep track of all the dogs that pass through their facility. You are required to make a command line-based dog shelter management application. Your application must allow a user to add, edit, search and view Contacts. The program must have a menu consisting of the following six (6) options: Add dog View all dogs View all available dogs View specific dog Update dog home status Exit Brief descriptions of each option in the menu Menu Item Description Add Dog 1) Asks the user for all the state value information for a dog. 2) Checks if there is space in the array to hold the new dog. 3) Check that the dogId is not already used in the system. 4) Creates a new Dog object and adds it to the array if there is space. If the array is full, print “Sorry… the Shelter is Full!”. Note: All new dogs have no home as yet (foundHome = false). View all dogs This menu option shows all dogs in the…arrow_forwardObject adapters and class adapters each provide a unique function. These concepts are also significant due to the significance that you attach to them.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT