Web Development and Design Foundations with HTML5 (8th Edition)
8th Edition
ISBN: 9780134322759
Author: Terry Felke-Morris
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 6, Problem 4MC
Which of the following configures a class called side to float to the left?
- a. .side {left: float;}
- b. .side {float: left;}
- c. side {float-left: 200px;}
- d. .side {position: left;}
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
An n-sided regular polygon’s sides all have the same length and all of its angles have the same degree (i.e., the polygon is both equilateral and equiangular). Design a class named RegularPolygon thatcontains:■ A private int data field named n that defines the number of sides in the polygon.■ A private float data field named side that stores the length of the side.■ A private float data field named x that defines the x-coordinate of the center of the polygon with default value 0.
■ A private float data field named y that defines the y-coordinate of the center of the polygon with default value 0.■ A constructor that creates a regular polygon with the specified n (default 3),side (default 1), x (default 0), and y (default 0).■ The accessor and mutator methods for all data fields.■ The method getPerimeter() that returns the perimeter of the polygon.■ The method getArea() that returns the area of the polygon. The formula for computing the area of a regular polygon is Area = (n * s2) / (4 *…
Compilation error
Main. java:16: error: incompatible types: char[][] cannot be converted to char[]
String string - String.copyValuedf(grid):
Main. java:39: error: constructor CharGrid in class CharGrid cannot be applied to given types;
grid-
new CharGrid(nunRows, numCols);
required: int, int, char
found: int, nt
reason: actual and formal argunent lists differ in lenath
Note: Some messages have been simplified; recompile with-Xdiags:verbose to get full output
2 errors
Hide
Time limit: 8 seconds
Memory limit: 256 MB
1// YOUR CODE HERE
2 class CharGrid(
3 private char[]] grid;
4.
public CharGrid(int nunRows, int nunCols, char symbol){
61
for (int i 0; 1< numRows: i++){
for (int j e; j< numCols; j++)(
grid[i][j]- symbol;
8
10
11
12
13
String string String.copyValueof (grid):
14
15
C0verride
16
public String tostring() (
17
return string:
18
19)
20
21
22
23
Submit
Start over (reset)
Design a class named RegularPolygon that contains: An int data field named n that defines the number of sides in the polygon with defaultvalue 3. A double data field named side that stores the length of the side with default value 1. A double data field named x that defines the x-coordinate of the polygon’s center withdefault value 0. A double data field named y that defines the y-coordinate of the polygon’s center withdefault value 0. A no-arg constructor that creates a regular polygon with default values. A constructor that creates a regular polygon with the specified number of sides andlength of side, centered at (0, 0). A constructor that creates a regular polygon with the specified number of sides, lengthof side, and x-and y-coordinates. The accessor and mutator methods for all data fields. The method getPerimeter() that returns the perimeter of the polygon. The method getArea() that returns the area of the polygon. The formula for a regular polygon is n*s2
/4*tan(pi/4)…
Chapter 6 Solutions
Web Development and Design Foundations with HTML5 (8th Edition)
Ch. 6.4 - Prob. 1CPCh. 6.4 - Prob. 2CPCh. 6.4 - Prob. 3CPCh. 6.15 - Prob. 1CPCh. 6.15 - Prob. 2CPCh. 6.15 - Prob. 3CPCh. 6 - Prob. 1MCCh. 6 - Prob. 2MCCh. 6 - Prob. 3MCCh. 6 - Which of the following configures a class called...
Ch. 6 - Prob. 5MCCh. 6 - Prob. 6MCCh. 6 - Prob. 7MCCh. 6 - Prob. 8MCCh. 6 - Prob. 9MCCh. 6 - Prob. 11FIBCh. 6 - Prob. 12FIBCh. 6 - The ____________ is always transparent.Ch. 6 - Prob. 14FIBCh. 6 - Prob. 15FIBCh. 6 - Prob. 1AYKCh. 6 - Prob. 2AYKCh. 6 - Prob. 3AYKCh. 6 - Prob. 1HOECh. 6 - Prob. 2HOECh. 6 - Prob. 3HOECh. 6 - Prob. 4HOECh. 6 - Prob. 5HOECh. 6 - Prob. 6HOECh. 6 - Prob. 7HOECh. 6 - Prob. 8HOECh. 6 - Prob. 9HOECh. 6 - Prob. 10HOE
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Are reflex actions (such as flinching from a hot stove) rational? Are they intelligent?
Artificial Intelligence: A Modern Approach
Why might doctors and nutritionists be interested in a device like DietSensor?
Using MIS (10th Edition)
In Exercises 1 through 22, determine the output displayed in the text box or list box by the lines of code.
Introduction to Programming Using Visual Basic (10th Edition)
Computers process data under the control of sets of instructions called
Java How To Program (Early Objects)
The following C++ program will not compile because the lines have been mixed up. cout Success\n; cout Success...
Starting Out with C++ from Control Structures to Objects (8th Edition)
An online or hard-copy repository for all project correspondence, inputs, outputs, deliverables, procedures, an...
Essentials of Systems Analysis and Design (6th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- CREATE A FLOWCHART. Creating a Class in Python class Rectangle: #start Rectangle class def __init__(self, rectWidth, rectHeight):#initialise the data members self.width=float(rectWidth)#assign width for object self.height=float(rectHeight ) #set height for object def calculateArea(self):#calculateArea function to calaulte the area return self.width *self.height # height * width = area def calculatePerimeter(self):#calculatePerimeter function to calaulte the perimeter return 2*(self.width +self.height) # perimeter = 2 * (width * height)arrow_forwardThe Circle class inherits from the Shape base class. Circle overrides the display() function defined in the Shape base class. Which of the following will call the base class display function from the Circle display function? this->display() Shape::display() display() ::display()arrow_forward.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_forwardJAVA:arrow_forwardDon't put incorrect code..arrow_forward
- In C#. Please make an interface that looks as descibes on the imagearrow_forwardPlease answer this in python Define a class in python named BoatRace that contains the following information about a Boat Race: race_name: string race_id: int distance: int racers: List of Boat objects Write a constructor that allows the programmer to create an object of type BoatRace with a race_name, race_id, list of racers objects, and distance. The constructor will only take in one parameter, a string representing the name of a CSV file. The file will have the following format: Each row will always have exactly two columns. The first row will always contain the name of the race. The second row will always contain the id number for the race. The third row will always contain the distance for the race. All remaining rows contain information about the boats involved in the race: the first column will be the name of the boat, and the second column is that boat’s top speed. For example, the race in the file below has two boats: The Fire Ball with top speed 12, and The Leaf with…arrow_forwardPlease create a java class that contains the following data attributes and methods: private int customerNumber - a unique number assigned to each customer private String firstName - the customer's first name private String lastName - the customer's last name private float balance - the customer's balance get/set Methods for each data attribute public String toString() - Special method to be used when printing a customer Record objectarrow_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_forwardHelp find the classes, how they are utilized and how many objects were created in this code provided by me Source is provided, mainmenu.cpp is the images. and mainmenu.h is also provided. Source.cpp #include <SFML/Graphics.hpp>#include "MainMenu.h"#include <time.h>#include <SFML/Window.hpp> using namespace sf; int N = 30, M = 20;int size = 16;int w = size * N;int h = size * M; int dir, num = 4; struct Snake{ int x, y;} s[100]; struct Fruit{ int x, y;} f; void Tick(){ for (int i = num;i > 0;--i) { s[i].x = s[i - 1].x; s[i].y = s[i - 1].y; } if (dir == 0) s[0].y += 1; if (dir == 1) s[0].x -= 1; if (dir == 2) s[0].x += 1; if (dir == 3) s[0].y -= 1; if ((s[0].x == f.x) && (s[0].y == f.y)) { num++; f.x = rand() % N; f.y = rand() % M; } if (s[0].x > N) s[0].x = 0; if (s[0].x < 0) s[0].x = N; if (s[0].y > M) s[0].y = 0; if (s[0].y < 0) s[0].y = M; for (int i = 1;i < num;i++) if…arrow_forwardDesign a class named Triangle that extends the GeometricObject class. The Triangle class contains:■ Three float data fields named side1, side2, and side3 to denote the threesides of the triangle.■ A constructor that creates a triangle with the specified side1, side2, andside3 with default values 1.0.■ The accessor methods for all three data fields.■ A method named getArea() that returns the area of this triangle.■ A method named getPerimeter() that returns the perimeter of this triangle.■ A method named _ _str_ _() that returns a string description for the triangle. For the formula to compute the area of a triangle, see Exercise 2.14. The_ _str_ _() method is implemented as follows:return "Triangle: side1 = " + str(side1) + " side2 = " +str(side2) + " side3 = " + str(side3)Draw the UML diagrams for the classes Triangle and GeometricObject.Implement the Triangle class. Write a test program that prompts the user to enter the three sides of the triangle, a color, and 1 or 0 to indicate…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Time Complexity Analysis - How To Calculate Running Time | InterviewBit; Author: InterviewBit;https://www.youtube.com/watch?v=--oxG4Q1PA0;License: Standard YouTube License, CC-BY