1. Write the code for the following classes
(All attributes in all classes must be private)
Emp (short for Employee)
The class Emp has 3 subclasses: 1. SalEmp (short for Salaried Employe), 2. HourlyEmp,
3. CommEmp (short for commission employee).
The class CommEmp has one subclass, BpCommEmp (short for base plus commission
Employee).
There is also a BusinessCar class
Class Emp
Attributes: empName, minSalary (short for minimum salary)
Methods: besides the usual methods (constructor, getters, setters, as needed), the class Emp has the
following 2 methods:
earnings(), which returns minSalary
displayInfo(), which displays name and minSalary
class SalEmp
Attribute: monthlySalary
Methods: besides the usual methods (constructor, getters, setters, as needed), the class EmpSal
has the following 2 methods:
earnings(), which returns the greater of minSalary and monthlySalary
displayInfo(), which displays name, monthlySalary, earnings()
class HourlyEmp
Attribute: hours, rate
Methods: besides the usual methods (constructor, getters, setters, as needed), the class EmpSal
has the following 2 methods:
earnings(), which returns the greater of minSalary and hours*rate
displayInfo(), which displays name, hours, rate , earnings()
class CommEmp
Attribute: sales, rate
Methods: besides the usual methods (constructor, getters, setters, as needed), the class EmpSal
has the following 2 methods:
earnings(), which returns the greater of minSalary and sales*rate
displayInfo(), which displays name, sales, rate , earnings()
class BpCommEmp
Attribute: baseSalary, car (car is a BusinessCar object )
Methods: besides the usual methods (constructor, getters, setters, as needed), the class EmpSal
has the following 2 methods:
earnings(), which returns sales*rate baseSalary
displayInfo(), which displays name, sales, rate , earnings(), car info
class BusinessCar
attributes: make, model, year
methods: as needed
2. Instantiate the following objects (in main()) and display the information for all objects, using the method dispayInfo() (car info to be provided via displayInfo())
Class Emp (empName,minSalary)
Adele 1500
Burt 1500
SalEmp (empName,monthlySalary, minSalary)
Carol 2000 1200
Diane 2000 1200
HourlyEmp (empName,hours, rate, minSalary)
Fonda 200 15 1000
CommEmp(empName,sales, rate, minSalary)
Doug 200000 0.10 1000
BpCommEmp (empName, sales, rate, baseSalary, car)
Grace 300000 0.2 1500 car: Toyota Lexus 2015
Mike 200000 0.2 3000 car: Toyota Camry 2015
3. (extra credit) Polymorphism
a. Display the information for all employees using polymorphism
b. increase the baseSalary of BpCommEmp by 10%
Deliverables. Important.
The program (as py files): all classes, and main() file
The output of program execution for questions 2 and 3
done
Seen
few seconds ago
Coding Collisions
OverviewDuring this assignment, you will bring together your knowledge from the previous weeks and build on it to create an engaging, collision-based 2D animation. There are many different kinds of choices you may make with this work, so take time to explore your options before getting started. You should not feel limited by the possibilities provided here. Feel free to try out new and different ideas as you create!
PromptYou will be completing your coding work in Visual Studio. Be sure to begin with a project file that has the libraries set up correctly from your earlier efforts in Module One. Then, copy the starter code from the Module Eight Assignment Code TXT file into your Visual Studio project. Remember, this is the same code you reviewed in the video for this week. From here you will be able to manipulate the provided code in a number of different ways. Note that Linmath.h is the only file from the original ZIP folders you used to complete your setup in Module One that is used in this week’s provided code.
Specifically, you must address the following rubric criteria:
Arrange the bricks into an organizational structure that promotes engagement with the animation. The goal is to create a layout that is visually unique or compelling and includes bricks of a style that makes the animation more interesting to watch. Some options for details you may wish to include are as follows, but you do not need to complete all of these. You can also try an idea of your own instead.Add texture or color to the different kinds of bricks.
Change the sizes of the bricks.
Add a manually controlled paddle to the bottom of the screen, using the brick item as a base.
Apply physics laws to the circles. When a circle hits one of the sides of the screen, its progress should be altered in some way. While the circles currently move at a constant speed and have randomized movement once they bounce off one edge of the screen, there are ways you can alter this to make the animation more engaging. Some options you may wish to use for your work are as follows, but you do not need to complete all of these. You can also try an idea of your own instead.Alter the speed of the circle.
Change the angle of trajectory so it follows physics laws instead of taking a randomized pattern. (This means it would continue in the direction it was heading rather than moving backward.)
Add friction to specific surfaces, which would affect the circle and slow its progress once it collided with the surface.
Alter the state of the bricks upon collision. When a circle collides with a brick, you will need to code for an event to occur. This means updating the code to alter the state of the bricks upon collision. Some options you may wish to use for your work are as follows, but you do not need to complete all of these. You can also try an idea of your own instead.Require the brick to take a certain number of hits before it disappears.
Change the color or texture of the brick when it is hit.
Combine both of the previous two options, meaning the brick changes its texture each time it is hit until it disappears. For example, you may choose to add cracks to the texture of the brick until it is “destroyed.”
Alter the state of the circles upon collision. When a circle collides with another circle, you will need to code for an event to occur. This means updating the code to alter the state of the circles upon collision. Some options you may wish to use for your work are as follows, but you do not need to complete all of these. You can also try an idea of your own instead.The two circles combine to become one larger circle.
The circles change their color or texture.
Both circles disappear once hit.
The circles spawn multiple smaller circles.
Explain the changes you made to the code. Discuss the work you completed by focusing on the different tactics you used to create a fully realized 2D animation. What were the changes you chose to make? What was your intent behind them? How did you approach coding to successfully create this outcome?
Create code that follows a logical flow without syntax errors. The code you create has to be executable and all the code that is included needs to be reached by the execution. Note that not everything should be written in a single function and your work should be well-modularized.
Apply coding best practices in your creations. Pay particular attention to the way you format and comment your code. Program code should be easy to read and follow industry standard code formatting practices, such as indentation and spacing. Commenting best practices should be in place to ensure the code is briefly and clearly explained using descriptive comments.
Guidelines for SubmissionSubmit a 100- to 200-word Microsoft Word document along with a completed ZIP folder containing all of your code. Your ZIP folder may include one or multiple CPP files along with Visual Studio project files. It should also include an EXE file, because without this your code will not be able to run. Checking for the EXE can be used as a quick reference on the functionality of your code before you submit.
done
Seen
4 mins ago
Computer Science Question
Computer Science Assignment Help Part A
Chapter 7, page 327: Question 9
Chapter 7, page 327: Question 19 (Explain how you came up with your solutions)
Chapter 7, page 327: Question 20
Part B
Coercion (implicit and explicit) are important to understand in programming languages. Install a C/C compiler of your choice for #1 below and a Java compiler of your choice for #2 below.
1.For your C/C compiler, verify whether or not the cast of the integer257 to a char results in an error by stating Yes or No.
§Use explicit type conversion.
§Paste a screenshot of your compiler output into the Word doc.
2.For your Java compiler/interpreter, verify whether or not the cast of the integer 655537 to a char results in an error by stating Yes or No.
§Use explicit type conversion.
§Paste a screenshot of your compiler output into the Word doc.
Computer Science Question
Write a brief paper on features of QUIC and HTTP/3 that help improve network performance in general and, specifically, on those that reduce the latency of a web transaction. Your target audience is someone who is familiar with networks in general, transport layer concepts and details of TCP, as well as with TLS and HTTP. You should include a brief general introduction to QUIC and HTTP/3 but focus mainly on the performance aspects.