Questions
Describe EBS and what features it offers

Describe EBS and what features it offers

In: Computer Science

CSCI 3000 Homework 5 In this homework, you will manage the car data of a dealer....

CSCI 3000 Homework 5

In this homework, you will manage the car data of a dealer. First, you will design a C++ class called Car. A single Car variable (object) have five member variables (attributes): VIN, make, model, year, and price.

Car class attributes should be private, and set/get functions should be implemented to access and update the values. Also, you should have at least two constructor functions to initialize Car objects. Finally a print() function should be implemented to print single Car data on the screen.

Class description is given below:

Car

Type

Member Variables

string

VIN

string

make

string

model

int

year

int

price

Return Type

Member Function

(constructor)

Car() //default constructor

(constructor)

Car(string newVIN, string newMake, string newModel, int newYear, int newPrice)

void

setVIN(string newVIN)

void

setMake(string newMake)

void

setModel(string newModel)

void

setYear(int newYear)

void

setPrice(int newPrice)

string

getVIN()

string

getMake()

string

getModel()

int

getYear()

int

getPrice()

void

print()

Once your class is ready, you will read the “cardata.txt” file, which includes all 250 cars in the dealer. A sample view of the file is given below:

Before you read file, you will create an array of cars having size of 250. This number is always 250 and does not change. In the file, each line contains a single car, for which attributes are separated by space character. So, you can read one line using a simple while loop such as:

     While(inputFile >> VIN >> make >> model >> year >> price){

           //create new car and send it to the corresponding array index

...

}

Once your car array is ready, you will provide following operations to the user in a menu.

  1. Print All Cars: Print all information of all Cars
  2. Print by Make: Get the model name from user and print all cars only in that model.
  3. Print by Price: Get a price input from the user and print all cars that have less than given input.
  4. Exit: Exit from the program.

You can write your code (including the car class definition and main function) in a single cpp file and submit that file. If you can separate the class files from the main program, you will get extra 10 points for the assignment. In that case, you will need to submit three files such as, “car.h”, “car.cpp”, and “main.cpp”. I will show you how to separate class files from main program in class.

On the top of your source code, please add your name and number, Course ID, HW number and the date using a comment block. Please see the example below,

In: Computer Science

In Software engineering, Describe in detail the role of class-oriented metrics in assessing the quality of...

In Software engineering, Describe in detail the role of class-oriented metrics in assessing the quality of an object-oriented system.

In: Computer Science

in java Design and implement a class called Dog that contains instance data that represents the...

in java

Design and implement a class called Dog that contains instance data that represents the dog’s name and age. Define the Dog constructor to accept and initialize instance data. Include getter and setter methods for the name and age. Include a method to compute and return the age of the dog in “person years” (seven times the dog’s age). Include a toString method that returns a one-line description of the dog. Create a Tester class called Kennel, whose main method instantiates and updates several Dog objects.

In: Computer Science

in java Write a program that will print the following output 1 1 2 1 1...

in java

Write a program that will print the following output

1 1 2 1 1 2 4 2 1 1 2 4 8 4 2 1 1 2 4 8 16 8 4 2 1 1 2 4 8 16 32 18 8 4 2 1

In: Computer Science

Girl? Jojo is looking for his love by sending messages to strangers on a dating application....

Girl?

Jojo is looking for his love by sending messages to strangers on a dating application. Because he knows that many people are using fake profile photos, he found a way to find out the gender of the user by their user names. If the number of distinct characters in one’s user name is even, then she is a female, otherwise he is a male. Help him to find out their gender! '

Format Input:

The first line is an integer T representing the number of test cases. The next T lines each consist of a string S representing the user name in the dating application.

Format Output:

For each test case output “Case #X: ”, where X is the case number, followed by “Yay” if the user is a female, or “Ewwww” if the user is a male.

Constraints

• 1 ≤ T ≤ 100

• 1 ≤ |S| ≤ 105

• S only consist of lowercase letter.

Sample Input 1 (standard input):

1

abb

Sample Output 1 (standard output):

Case #1: Yay

Sample Input 2 (standard input):

2

abbc

za

Sample Output 2 (standard output):

Case #1: Ewwww

Case #2: Yay

Note:

On the first sample input, first test case, the user is female because there are 2 different letters namely “a” and “b”, so the output is “Yay”.

note : USE C language, integer must be the same as the constraint, DONT USE VOID, RECURSIVE(RETURN FUNCTION), RESULT, code it under int main (must be blank){

In: Computer Science

in java Create a class called Customer in three steps: • (Step-1): • Add a constructor...

in java

Create a class called Customer in three steps: • (Step-1): • Add a constructor of the class Customer that takes the name and purchase amount of the customer as inputs. • Write getter methods getName and getPrice to return the name and price of the customer. You can write a toString() method which returns printed string of Customer name and its purchase. • (Step-2): Create a class called Restaurant. • Write a method addsale that takes customer name and purchase amount of the customer in the class restaurant and stores it into an array list. • Write a method nameBestCustomer that returns customer name who bought highest sale in the restaurant. • (Step-3): Write a tester class that prompts the user to enter name and purchase of the customers and display the name of the customer who bought highest sales in the restaurant.

In: Computer Science

I need this code in java. Task (1) Create two files to submit: ItemToPurchase.java - Class...

I need this code in java.

Task

(1) Create two files to submit:

  • ItemToPurchase.java - Class definition
  • ShoppingCartPrinter.java - Contains main() method

Build the ItemToPurchase class with the following specifications:

  • Private fields
    • String itemName - Initialized in default constructor to "none"
    • int itemPrice - Initialized in default constructor to 0
    • int itemQuantity - Initialized in default constructor to 0
  • Default constructor
  • Public member methods (mutators & accessors)
    • setName() & getName() (2 pts)
    • setPrice() & getPrice() (2 pts)
    • setQuantity() & getQuantity() (2 pts)

(2) In main(), prompt the user for two items and create two objects of the ItemToPurchase class. Before prompting for the second item, call scnr.nextLine(); to allow the user to input a new string. (2 pts)

Ex:

Item 1
Enter the item name:
Chocolate Chips
Enter the item price:
3
Enter the item quantity:
1

Item 2
Enter the item name:
Bottled Water
Enter the item price:
1
Enter the item quantity:
10


(3) Add the costs of the two items together and output the total cost. (2 pts)

Ex:

TOTAL COST
Chocolate Chips 1 @ $3 = $3
Bottled Water 10 @ $1 = $10

Total: $13

This is the given code so far:

import java.util.Scanner;

public class ShoppingCartPrinter {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
int i = 0;
String productName;
int productPrice = 0;
int productQuantity = 0;
int cartTotal = 0;
  
// TODO Create new item1 and new item2

// Prompt for item 1 details from user, create itemToPurchase object
System.out.println("Item 1");
System.out.println("Enter the item name:");
productName = scnr.nextLine();
  
System.out.println("Enter the item price:");
productPrice = scnr.nextInt();
  
System.out.println("Enter the item quantity:");
productQuantity = scnr.nextInt();
System.out.println("");
  
// TODO: Set item1 fields here
  

// Promptr for item 2 details from user, create itemToPurchase object
System.out.println("Item 2");
System.out.println("Enter the item name:");
scnr.nextLine(); // DO NOT OMIT THIS LINE
productName = scnr.nextLine();
  
System.out.println("Enter the item price:");
productPrice = scnr.nextInt();
  
System.out.println("Enter the item quantity:");
productQuantity = scnr.nextInt();
System.out.println("");
  
// TODO set item2 here

  
// Add costs of two items and print total
cartTotal = (item1.getPrice() * item1.getQuantity()) +
(item2.getPrice() * item2.getQuantity());
System.out.println("TOTAL COST");
System.out.println(item1.getName() + " " + item1.getQuantity() +
" @ $" + item1.getPrice() + " = $" +
(item1.getPrice() * item1.getQuantity()));
System.out.println(item2.getName() + " " + item2.getQuantity() +
" @ $" + item2.getPrice() + " = $" +
(item2.getPrice() * item2.getQuantity()));
System.out.println("");
System.out.println("Total: $" + cartTotal);
  
return;
}
}

In: Computer Science

in java write a program that initializes a String variable with "Welcome to Jac444!". Then, use...

in java

write a program that initializes a String variable with "Welcome to Jac444!". Then, use methods of the String class to examine the string and output a few properties of the string, namely The string by itself The length of the string The first character in the string The last character in the string The first word of the string The last word of the string Make sure that your output also contains how many words exists in the string.

In: Computer Science

1a. What does doping do to silicon? 1b. When no current is applied to a diode,...

1a. What does doping do to silicon?

1b. When no current is applied to a diode, what forms at the junction between the N-type and P-type layers?

1c. What is the biggest problem to account for while manufacuring silicon chips?

In: Computer Science

COURSE : IT Enterprise systems Consider the Relations below STUDENT Student# Std-Name Address 1 Smith Jeddah...

COURSE : IT Enterprise systems

Consider the Relations below

STUDENT

Student#

Std-Name

Address

1

Smith

Jeddah

2

Bob

Buraidah

3

Alice

Dammam

COURSE

Student#

Course Code

Course-Name

1

IT241

Operating System

2

IT210

Computer Network

2

IT445

Decision Support System

Write a query using the Right Outer Join to retrieve the record from the two relations. Also, construct the table displaying the output of your query.

note: NEED A UNIQUE ANSWER AND NO HANDWRITING PLEASE..

THANK YOU

In: Computer Science

import os def process_dir(p, indent): for item in os.listdir(path): if os.path.isfile("{0}/{1}".format(path, item)): print("\t"*indent, item) elif os.path.isdir("{0}/{1}".format(path,...

import os

 
def process_dir(p, indent):
    for item in os.listdir(path): 
        if os.path.isfile("{0}/{1}".format(path, item)):
            print("\t"*indent, item)
        elif os.path.isdir("{0}/{1}".format(path, item)):
            print("\t"*indent, "\x1b[1;31m{}\x1b[0;0m".format(item))
            process_dir("{0}/{1}".format(path, item), indent+1)
        else:
            print("Not a file or directory")

path=input("Enter a valid system path: ")
print("\x1b[1;31m{}\x1b[0;0m".format(path))
process_dir(path, 1)
  1. 1. Figure out what the program is trying to do.
    1. Add meaningful comments that tell what the program is doing.
    2. There is a bug in this program that causes it to work incorrectly; find the bug, and fix it
  2. c. Put in some error detection code so that the program will not be able to crash

In: Computer Science

how to Download Ubuntu 20.04 and store on a USB memory stick, which must act as...

how to Download Ubuntu 20.04 and store on a USB memory stick, which must act as a bootable DVD.

In: Computer Science

Write a JAVA program that implements the following disk-scheduling algorithms: FCFS

Write a JAVA program that implements the following disk-scheduling algorithms:

  1. FCFS

In: Computer Science

2. Define the following terms in your own words : a. Computer. b. Hardware (H/W). c....

2. Define the following terms in your own words :

a. Computer.

b. Hardware (H/W).

c. Software (S/W).

d. Input Devices.

e. Output devices.

f. Primary Memory.

g. Peripheral device.

In: Computer Science