Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 1, Problem 2CP
The case problems in this section introduce two fictional businesses. Throughout this book, you will create increasingly complex classes for these businesses that use the newest concepts you have mastered in each chapter.
Marshall’s Murals is a company that paints interior and exterior murals for both business and residential customers. Write a
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
#this is a python program
#topic: OOP
Design the Country class so that the code gives the expected output. [You are not allowed to change the code below]
# Write your Class Code here
country = Country()
print('Name:',country.name)
print('Continent:',country.continent)
print('Capital:',country.capital)
print('Fifa Ranking:',country.fifa_ranking) print('===================')
country.name = “Belgium”
country.continent = “Europe”
country.capital = “Brussels”
country.fifa_ranking = 1
print('Name:',country.name)
print('Continent:',country.continent)
print('Capital:',country.capital)
print('Fifa Ranking:',country.fifa_ranking)
Output:
Name: Bangladesh
Continent: Asia
Capital: Dhaka
Fifa Ranking: 187
===================
Name: Belgium
Continent: Europe
Capital: Brussels
Fifa Ranking: 1
Develop a set of classes for a college to use in various student service and personnel applications. Classes you need to design include the following:
•• Person—A Person contains a first name, last name, street address, zip code, and phone number. The class also includes a method that sets each data field, using a series of dialog boxes and a display method that displays all of a Person’s information on a single line at the command line on the screen.
•• CollegeEmployee—CollegeEmployee descends from Person. A CollegeEmployee also includes a Social Security number, an annual salary, and a department name, as well as methods that override the Person methods to accept and display all CollegeEmployee data.
•• Faculty—Faculty descends from CollegeEmployee. This class also includes a Boolean field that indicates whether the Faculty member is tenured, as well as methods that override the CollegeEmployee methods to accept and display this additional piece of information.
•• Student—Student…
May I please have your assistance with this lab:
2.15 LAB: Artwork label ( modules)
Part of the code is correct. I am only needing the code to be correct for the following errors:
This is the current code & errors at bottom of code:
# Artist.py
class Artist:
# below is the comstructor to initializez artist infomration
# constructor initialize the artist's name to "None" and the years of birth and death to 0
def __init__(self, name='None', birth_year=0, death_year=0):
self.name = name
self.birth_year = birth_year
self.death_year = death_year
def print_info(self):
if self.birth_year >= 0 and self.death_year >= 0:
print(f'Artist: {self.name} ({self.birth_year} to {self.death_year})')
elif self.birth_year >= 0:
print(f'Artist: {self.name} ({self.birth_year} - present)')
else:
print(f'Artist: {self.name} (unkown)')
# Artwork.py
class Artwork:…
Chapter 1 Solutions
Microsoft Visual C#
Ch. 1 - Programming languages such as C#, Java, and Visual...Ch. 1 - Prob. 2RQCh. 1 - The grammar and spelling rules of a programming...Ch. 1 - Prob. 4RQCh. 1 - Programs in which you create and use objects that...Ch. 1 - Prob. 6RQCh. 1 - The technique of packaging an objects attributes...Ch. 1 - Of the following languages, which is least similar...Ch. 1 - Prob. 9RQCh. 1 - The C# method that produces a line of output on...
Ch. 1 - Prob. 11RQCh. 1 - Prob. 12RQCh. 1 - Prob. 13RQCh. 1 - Prob. 14RQCh. 1 - Prob. 15RQCh. 1 - Prob. 16RQCh. 1 - The text of a program you write is called...Ch. 1 - Prob. 18RQCh. 1 - Prob. 19RQCh. 1 - Prob. 20RQCh. 1 - Indicate whether each of the following C#...Ch. 1 - Name at least three attributes that might be...Ch. 1 - Prob. 3ECh. 1 - Prob. 4ECh. 1 - Prob. 5ECh. 1 - Prob. 6ECh. 1 - Prob. 7ECh. 1 - Write a program named BigLetter that displays a...Ch. 1 - From 1925 through 1963, Burma Shave advertising...Ch. 1 - Each of the following files in the Chapter.01...Ch. 1 - The case problems in this section introduce two...Ch. 1 - The case problems in this section introduce two...
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
- For your homework assignment, build a simple application for use by a local retail store. Your program should have the following classes: Item: Represents an item a customer might buy at the store. It should have two attributes: a String for the item description and a float for the price. This class should also override the __str__ method in a nicely formatted way. Customer: Represents a customer at the store. It should have three attributes: a String for the customer's name, a Boolean for the customer's preferred status, and a list of 5 indexes to hold Item objects. Include the following methods: make_purchase: accepts a String and a double as parameters to represent the name and price of an item this customer is purchasing. Create a new Item object with this info and append it to the internal list. If the customer is a preferred customer based on the Boolean attribute's value, take 10% off the total sale price. __str__: Override this method to print the customer's name and every…arrow_forwardDevelop a set of classes for a college to use in various student service andpersonnel applications. Classes you need to design include the following:• Person—A Person contains a first name, last name, street address, zip code,and phone number. The class also includes a method that sets each datafield, using a series of dialog boxes and a display method that displays all of aPerson’s information on a single line at the command line on the screenarrow_forwardcreate a class named checkup with fields that you read a patient number, blood pressure figures (systolic or diastolic), and two cholesterol figures (ldl and hdl). include a method named computeratio() that divides ldl cholesterol by hdl cholesterol and displays the result. include an additional method named explainratio() that explains that hdl is knowns as “good cholesterol” and that a ratio of 3.5 or lower is considered optimum pseudo codearrow_forward
- The case problems in this section introduce two fictional businesses. Throughout this book, you will create increasingly complex classes for these businesses that use the newest concepts you have mastered in each chapter. Greenville County hosts the Greenville Idol competition each summer during the county fair. The talent competition takes place over a three-day period during which contestants are eliminated following rounds of performances until the years ultimate winner is chosen. Write a program named GreenvilleMotto that displays the competitions motto, which is The stars shine in Greenville. Create a second program named GreenvilleMott02 that displays the motto surrounded by a border composed of asterisks.arrow_forwardThe Huntington Boys and Girls Club is conducting a fundraiser by selling chili dinners to go. The price is $7 for an adult meal and $4 for a child’s meal. Write a class that accepts the number of each type of meal ordered and display the total money collected for adult meals, children’s meals, and all meals. Save the class as ChiliToGo.java.arrow_forwardI would like you to create a program that keeps track of the inventory (by make - e.g., Toyota) of cars on a used car lot. you will have to create two classes. The first is a simple Car class that consists of an inventory, make, and model. The second class you need to create for this challenge is the Lot. A Lot can contain many cars. Part 1 Write the Car constructor, get methods, and toString method. Part 2 Write the Car's increase and decrease inventory methods. Part 3 Edit the Car so it implements Comparable and compares Car instances based on their inventory in descending order. Part 4 Write the getCars and getCarsSorted methods of the Lot class. Part 5 Write the getInventory method of the Lot class. Part 6 Use a try/catch block in the Car's constructor so that it sets the inventory to 0 if the inventory passed to the constructor is not a valid integer. this is the output that should be produced by main: Make: [Toyota Camry (10), Toyota Prius (4), Toyota Rav4 (16)] [Hyundai…arrow_forward
- THIS NEEDS TO BE DONE IN JAVA! Create a class called Employee that includes three instance variables—a first name (type String), a last name (type String) and a monthly salary (double). Provide a constructor that initializes the three instance variables. Provide a set and a get method for each instance variable. If the monthly salary is not positive, do not set its value. Write a test app named EmployeeTest that demonstrates class Employee’s capabilities. Create two Employee objects and display each object’s yearly salary. Then give each Employee a 10% raise and display each Employee’s yearly salary again.arrow_forwardYou are required to implement a shopping cart module for an online shopping mall. From the available items auser will select the item to purchase and add this into his shopping cart. Before the checkout customer canremove any item from the cart at any time.A single item in the cart contains the following details:class Item{private:int itemID;string itemName;double price;double purchasedQuantity;double totalPrice;public://constructors and getter setters};For the implementation of the required module you have to meet the following requirements:1- Customer can add any item to the cart in desired quantity.Remember if customer added the same item in the cart again, your implementation will not add this as a newitem it will check if the item already exists than it will just add the new quantity in the previous and updateother data.2- Customer can remove item or change the quantity at any time.There are two possibilities:i. Customer wants to remove the item form the cartii. Customer wants to…arrow_forwardDesign a program using a console application in java NetBeans, named studentMarksReport that will print the final result obtained by a student with the weighting of each module. Make use of a class named Student that contains variables to store the student number, test result, assignment result and exam. Create a constructor that accepts the student number, test result, assignment result and the exam result as parameters and create get methods for the variables (UseJOptionePane to get variable from the user). Create a subclass called Student_Report that extends the Student class. The Student_Report overrides all getter methods and the constructor from Students. Write code for the print_report method which calculates each assessment weighting as follows: test =25% weighting assignment=25%weighting exam=50%weightingarrow_forward
- Design a program using a console application in java NetBeans, named studentMarksReport that will print the final result obtained by a student with the weighting of each module. Make use of a class named Student that contains variables to store the student number, test result, assignment result and exam. Create a constructor that accepts the student number, test result, assignment result and the exam result as parameters and create get methods for the variables (UseJOptionePane to get variable from the user). Create a subclass called Student_Report that extends the Student classarrow_forwardIn java A Carpet Company has asked you to write an application that calculates the price of carpeting for rectangular rooms in a building. To calculate the price, you multiply the area of the floor (width * length) by the price per square foot of carpet. For example, the area of floor that is 12 feet long and 10 feet wide is 120 square feet. To cover that floor with carpet that costs 300 per square foot would cost (12 * 10 * 300 = 36000.) First, you should create a class named RoomDimension that has two attributes: one for the length of the room and one for the width. Provide getters/setters, parameterized constructor and a toString method. The RoomDimension class should also have a member function that returns the area of the room. Once you have written the class, use in a test application that asks the user to enter the number of rooms in building create array of that size, then ask user to enter dimensions for each room, also ask user for price per square foot of the desired…arrow_forward#this is a python program #topic: OOP Design the Player class so that the code gives the expected output. [You are not allowed to change the code below] # Write Your Class Code Here player1 = Player() player1.name = "Ronaldo" player1.jersy_number = 9 player1.position = "Striker" print("Name of the Player:", player1.name) print("Jersey Number of player:", player1.jersy_number) print("Position of player:", player1.position) print(“===========================”) player2 = Player() player2.name = "Neuer" player2.jersy_number = 1 player2.position = "Goal Keeper" print("Name of the player:", player2.name) print("Jersey Number of player:", player2.jersy_number) print("Position of player:", player2.position) Output: Name of the Player: Ronaldo Jersy Number of player: 9 Position of player: Striker =========================== Name of the player: Neuer Jersy Number of player: 1 Position of player: Goal Keeperarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Memory Management Tutorial in Java | Java Stack vs Heap | Java Training | Edureka; Author: edureka!;https://www.youtube.com/watch?v=fM8yj93X80s;License: Standard YouTube License, CC-BY