Write a
Want to see the full answer?
Check out a sample textbook solutionChapter 5 Solutions
Java: An Introduction to Problem Solving and Programming (8th Edition)
Additional Engineering Textbook Solutions
Starting Out with C++ from Control Structures to Objects (9th Edition)
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Computer Science: An Overview (12th Edition)
Web Development and Design Foundations with HTML5 (8th Edition)
- Write the program, which has two classes one, is Date having members (day, month, year) and the other class is called Employee. The employee has Date class as member as each employee has Date of joining, Date of Birth etc. a. Determine if an employee joined the organization within last five years if the current year is 2012. b. Determine if an Employee has age less than 40 years?arrow_forwardConsider writing a program to manage a collection of movies. There are three kinds of movies in the collection: dramas, comedies, and documentaries. The collector would like to keep track of each movie's title, the name of its director, and the year the movie was made. Some operations are to be implemented for all movies, and there will also be special operations for each of the three different kinds of movies. How would you design the class(es) to represent this system of movies? Your design should implement the concept of Overridingarrow_forwardRead the following scenario: To implement an exam, an instructor first notifies the students of the exam date and the topics to be covered. The instructor will prepare the exam paper, gets it copied to produce enough copies for the class, and hands it out to students at the designated time and location. The students attempt their answers to exam questions and hand in their answer papers to the instructor. The instructor then gives the answer papers to the tutor, along with sample solutions to each question, and gets them to mark it. The tutor will then records all the marks and return the answer papers to the students. After the answer papers have been returned to the students, they can raise any issues or queries about the marks they received. The instructor then reviews these queries/issues and decides whether marks adjustments are needed. If there are marks adjustments, the instructor will request the tutor to make the necessary changes in the marks record. Draw a sequence diagram…arrow_forward
- Using the Python language answer the following questions below. Please tell me what program you use if it is IDLE or Atom or a python website please provide the website you use.arrow_forwardYour task is to write a program that computes paychecks. Employees are paid an hourly rate for each hour worked; however, if they worked more than 40 hours per week, they are paid at 150 percent of the regular rate for those overtime hours. Name an actor class that would be appropriate for implementing this program . Then name a class that isn't an actor class that would be an appropriate alternative. How does the choice between these alternatives affect the program structure? Implement the appropriate class and solve the problem. You need to test your code using a separate main class program named "exel.java” Javaarrow_forwardWrite a program that uses a bar chart to display the percentagesof the overall market share represented by Apple, HTC, Samsung, andOthers, as shown in Figure . Suppose that Apple takes 20 percent and isdisplayed in red, HTC takes 26 percent and is displayed in blue, Samsung takes28 percent and is displayed in green, and the Others take 26 and are displayedin orange. Use the Rectangle class to display the bars. Interested readers mayexplore the JavaFX BarChart class for further study.arrow_forward
- Suppose you have some rupees in your hands. You can buy from this money something from that shop where billing is done in rupees. Suppose you go to such a shop for buying where only dollars are accepted, you cannot use your rupees there. This money is like a class. A class can fulfill only a particular requirement. It is not useful to handle different situations. Now suppose you have a credit card. In a shop, you can easily pay in rupees by using your credit card. If you go to another shop where dollars are accepted, you can also pay in dollars. The same credit card can be used to pay in pounds also. But how is this credit card paying in different currencies? Let’s understand it. Basically, a credit card is like an interface that performs several tasks. It is a thin plastic card that contains identification information such as your name, bank name, and perhaps some numbers. It does not hold any money physically. But here question is that how are shop keepers able to draw money from…arrow_forwardWrite a program to play an automated dice game that uses two dice (GVDie class provided). The player rolls both dice and either wins one credit, loses one credit, or sets a goal for future rolls. Current round ends when player wins or loses a credit. Game ends when credits are zero.Note: this program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress.Step 0. Read starter template and do not change the provided code. Two GVDie objects are created. A random seed is read from input and passed to a die. This supports automated testing and creates predictable results that would otherwise be random. Starting credits is read from input. Step 1 Roll both dice. Player wins one credit by rolling 7 or 11. Player losses one credit by rolling 2, 3, or 12. Otherwise, credits do not change and the player's goal is set to the dice total. The player's goal must be repeated in…arrow_forwardWrite the program in python. Write a class called BuildersGame that represents the board for a two-player game that is played on a 5x5 grid. During the game, each players' builders will move around the board and add levels to towers. The winner is the first one to move a builder on top of a 3-story tower. First, x places her two builders on the board, then o places her two builders on the board. Throughout the game, no two builders can ever occupy the same square. After the initial placements are complete, x must move either one of her builders to an adjacent square (one square orthogonally or diagonally). Builders always move to the top of the tower on their destination square. Builders can move any number of levels down, but can move at most 1 level up (they can also stay at the same level). You can visualize it as the builders hopping from the top of one tower to the top of another, but they can never move to a tower that is more than one level higher than the tower they're on.…arrow_forward
- In this exercise you will write a program to compute the distance between any two geo locations. In this program you will ask the user for four numbers. starting latitude starting longitude ending latitude ending longitude Then, using the GeoLocation class and our earlier example as a reference, compute the distance in miles between the two locations. A sample program run should match exactly as below: Enter the latitude of the starting location: 48.8567 Enter the longitude of the starting location: 2.3508 Enter the latitude of the ending location: 51.5072 Enter the longitude of the ending location: 0.1275 The distance is 208.08639358288565 miles. setInputs(String[]) should be included /* * This class stores information about a location on Earth. Locations are * specified using latitude and longitude. The class includes a method for * computing the distance between two locations. * * This implementation is based off of the example from Stuart Reges at * the University of…arrow_forwardPlease Solve Part B onlyarrow_forwardWrite a program that displays a clock to show the current time, as shown in Figure 9.27a. To obtain the current time, use the datetime class in Supplement II.B.arrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning